View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Sailthru > Sailthru-Client-1.002 > Sailthru::Client



Annotate this POD


New  1
Open  0
View/Report Bugs
Module Version: 1.002   Source   Latest Release: Sailthru-Client-2.3.0


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


 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 => "", your_variable => "some_value");
 %options = ( reply_to => "your reply_to header");


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.

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


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.



override Reply-To header


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.

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 the Sailthru API documentation for more details on their API.


Steve Miketa

Sam Gerstenzang


Copyright (C) 2011 by Steve Miketa <>

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: