GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  THESCHWARTZ::WORKER::SENDEMAIL (3)

.ds Aq ’

NAME

TheSchwartz::Worker::SendEmail - sends email using SMTP

CONTENTS

SYNOPSIS



  use TheSchwartz;
  use TheSchwartz::Worker::SendEmail;
  TheSchwartz::Worker::SendEmail->set_HELO("example.com");
  my $sclient = TheSchwartz->new(databases => \@Conf::YOUR_DBS);
  $sclient->can_do("TheSchwartz::Worker::SendEmail");
  $sclient->work; # main loop of program; goes forever, sending email



DESCRIPTION

This is a worker class for sending email (designed for <B>lotsB> of email) using TheSchwartz job queue and a slightly-tweaked subclass of Net::SMTP. See TheSchwartz for more information.

JOB ARGUMENTS

When constructing a SendEmail job using TheSchwartz’s insert_job method, construct your TheSchwartz::Job instance with its ’argument’ of the following form:



   {
      # recipients:
      rcpts    => [ $email1, $email2, ... ],
      env_from => $envelope_from_address,
      data     => $headers_and_body_as_big_string,
   }



Note that Bcc: headers will be removed, and a Message-ID header will be added if not present, but nothing else is magical. This module does no MIME, etc. There are other modules for that.

CLASS METHODS

    set_resolver



   TheSchwartz::Worker::SendEmail->set_resolver($net_dns_resolver_obj)



Sets the DNS resolver object to use. By default, just uses a new Net::DNS::Resolver.

    set_HELO



   TheSchwartz::Worker::SendEmail->set_HELO("example.com");



Sets the domain to announce in your HELO.

    set_on_5xx



    TheSchwartz::Worker::SendEmail->set_on_5xx(sub {
        my ($email, $thesch_job, $smtp_code_space_message) = @_;
    });



Set a subref to be run upon encountering a 5xx error. Arguments to your subref are the email address, TheSchwartz::Job object, and a scalar string of the form SMTP_CODE SMTP_MESSAGE. The return value of your subref is ignored.

AUTHOR

Brad Fitzpatrick — brad@danga.com

COPYRIGHT, LICENSE, and WARRANTY

Copyright 2006-2007, SixApart, Ltd.

License to use under the same terms as Perl itself.

This software comes with no warranty of any kind.

SEE ALSO

TheSchwartz
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 THESCHWARTZ::WORKER::SENDEMAIL (3) 2007-04-25

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.