Sailthru > Sailthru-Client-1.002 > Sailthru::Client

Download:
Sailthru-Client-1.002.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.002   Source   Latest Release: Sailthru-Client-2.002

NAME ^

Sailthru::Client - Perl module for accessing Sailthru's API

SYNOPSIS ^

 use Sailthru::Client;
 my $tm = Sailthru::Client->new('api_key','secret'); # You can optionally include a timeout in seconds as a third parameter.
 %vars = ( name => "Joe Example", from_email => "approved_email@your_domain.com", your_variable => "some_value");
 %options = ( reply_to => "your reply_to header");
 $tm->send("template_name",'example@example.com',\%vars,\%options);

DESCRIPTION ^

Sailthru::Client is a Perl module for accessing the Sailthru API.

All methods return a hash with return values. Dump the hash or explore the Sailthru API documentation page for what might be returned.

http://docs.sailthru.com/api

Some options might change. Always consult the Sailthru API documentation for the best information.

METHODS

getEmail( $email )
setEmail( $email, \%vars, \%lists, \%templates )

Takes email as string. vars, lists, templates as hash references. The vars hash you choose your own key/values for later substitution. The lists hash should be of format list_name => 1 for subscribed, 0 for unsubscribed. The templates hash is a list of templates user has opted out, use the key as the template name to signal opt-out. As always, see the Sailthru documentation for more information.

send( $template, $email, \%vars, \%options, $schedule_time )

Send an email to a single address. Takes template, email and schedule_time as strings. vars, options as hash references.

Options:

replyto

override Reply-To header

test

send as test email (subject line will be marked, will not count towards stats)

getSend( $send_id )

Check if send worked, using send_id returned in the hash from send()

scheduleBlast( $name, $list, $schedule_time, $from_name, $from_email, $subject, $content_html, $content_text, \%options )

Schedule an email blast. See the API documentation for more details on what should be passed.

http://docs.sailthru.com/api/blast

getBlast( $blast_id )

Check if blast worked, using blast_id returned in the hash from scheduleBlast() Takes blast_id.

copyTemplate( $template_name, $data_feed, $setup, $subject_line, $schedule_time, $list, \%options )

Allows you to use an existing template to send out a blast.

getTemplate( $template_name )

Retrieves information about the template

importContacts( $email, $password )

Import contacts from major providers. Takes email, password as strings. By default does not include names. Pass 1 as third argument to include names.

SEE ALSO ^

See the Sailthru API documentation for more details on their API.

http://docs.sailthru.com/api

AUTHOR ^

Steve Miketa

Sam Gerstenzang

LICENSE AND COPYRIGHT ^

Copyright (C) 2011 by Steve Miketa <steve@sailthru.com>

Adapted from the original Triggermail module created by Sam Gerstenzang

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: