View on
Mike Friedman > Net-SMTP-IPMM > Net::SMTP::IPMM



Annotate this POD


Open  1
View/Report Bugs
Module Version: 0.03   Source  


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


Version 0.01


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

    # define parts
    my $part1 = "From: me\\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( '' );

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

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

    # 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( '' );

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( '' );
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( '' );

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\$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. :)


Mike Friedman <>

Douglas Hunter, <>


Please report any bugs or feature requests to, or through the web interface at 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.

syntax highlighting: