22 Sep 2005 00:14:44 UTC
- Distribution: Net-SMTP-IPMM
- Module version: 0.03
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (479 / 1 / 0)
- KwaliteeBus factor: 0
- 20.20% Coverage
- License: unknown
- Activity24 month
- Download (3.68KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionFRIEDO Mike Friedman
Net::SMTP::IPMM - IronPort Mail-Merge interface
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( 'firstname.lastname@example.org' ); # first person, both parts $self->xdfn( parts => "1,2", fname => "Some", lname => "Guy", ); $self->to( 'email@example.com' ); # second person, first part only $self->xdfn( parts => "1", fname => "Another", lname => "Guy", ); $self->to( 'firstname.lastname@example.org' ); # send the parts. $self->xprt( $part1, $part2 );
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.
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( 'email@example.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( 'firstname.lastname@example.org' );
- 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 to Douglas Hunter for doing most of the work. :)
Please report any bugs or feature requests to
email@example.com, 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 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.
Module Install Instructions
To install Net::SMTP::IPMM, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Net::SMTP::IPMM
For more information on module installation, please visit the detailed CPAN module installation guide.