The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::SMTP::IPMM - IronPort Mail-Merge interface

VERSION

Version 0.01

SYNOPSIS

    use Net::SMTP::IPMM;
    my $ipmm = Net::SMTP::IPMM->new( 'ipmmhost' );

    # define parts
    my $part1 = "From: me\@mydomain.org\n" .
                "To: &*TO;\n" .
                "Subject: This is a message\n\n" .
                "Dear &FNAME;,\n";
         
    my $part2 = "Your last name is &LNAME;.\n"; 

    # from addresss
    $self->xmrg( 'me@mydomain.com' );

    # first person, both parts
    $self->xdfn( parts => "1,2", 
                 fname => "Some",
                 lname => "Guy", );
    $self->to( 'someguy@example.com' );

    # second person, first part only
    $self->xdfn( parts => "1", 
                 fname => "Another",
                 lname => "Guy", );
    $self->to( 'anotherguy@somewhereelse.com' );

    # send the parts.
    $self->xprt( $part1, $part2 );

DESCRIPTION

IronPort Mail Merge (IPMM) is a proprietary extension to SMTP used on IronPort's email server appliances. This module is a subclass of Net::SMTP which impliments the IPMM extensions. All the Net::SMTP methods are inherrited by this module. See the documentation for Net::SMTP for general usage examples. For more on IPMM, see the documentation that came with your IronPort appliance.

METHODS

new

Constructor. Pass the hostname of the IronPort as the first parameter:

    my $ipmm = Net::SMTP::IPMM->new( 'ironport.foo.com' );

For additional configuration options see the docs for Net::SMTP.

ackrcpt( BOOL )

Turn RCPT acknowledgements on or off. Off means less traffic and higher performance (which is probably why you bought an IronPort). Pass any true value to turn RCPT acknowledgements on, false for off.

xmrg( ADDRESS )

This sends an XMRG FROM command (replacing MAIL FROM from regular SMTP.) You must use this method to tell the IronPort that mail-merge data is coming.

    $ipmm->xmrg( 'me@mydomain.com' );
xdfn( PARTS => PART_NUMBERS, key => value, key => value, ... )

This sends an XDFN command. XDFN is used to send each recipient's data to the IronPort. PART_NUMBERS is a string containing a comma-separated list of "parts" for the recipient. The key/value pairs will be substituted into the message by the IronPort. Note that message parts are not zero-indexed (the first one is "1".)

    $ipmm->xdfn( PARTS => "1,2,5",
                 fname => 'Mike',
                 lname => 'Friedman',
                 zip   => '11106' );
    $ipmm->to( 'mfriedman@plusthree.com' );
xprt( MESSAGE_PARTS )

This sends all the message parts to the IronPort and begins the mailing. MESSAGE_PARTS is a list of strings containing the message parts with the appropriate variables in them.

    my $part1 = "From: sender\@mydomain.org$CRLF" .
                "To: &*TO;$CRLF" .
                "Subject: message$CRLF$CRLF" .
                "Dear &FNAME;,$CRLF";

    my $part2 = "Your last name is &LNAME;.$CRLF";

    $ipmm->xprt( $part1, $part2 );

THANKS

Thanks to Douglas Hunter for doing most of the work. :)

AUTHORS

Mike Friedman <mfriedman@plusthree.com>

Douglas Hunter, <dug@plusthree.com>

BUGS

Please report any bugs or feature requests to bug-net-smtp-ipmm@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-SMTP-IPMM. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT & LICENSE

Copyright 2005 PlusThree LP, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.