Set Return-Path with Perl Mail::Mailer - June 26, 2009
If you want to set the Return-Path value in your mail header in a message sent using the Mail Mailer Perl module, here is one way to do it:
Declare your mailer object with the -t and -ba flags.
#!/usr/bin/perl
use Mail::Mailer;
my $mailer = Mail::Mailer->new(’sendmail’, (’-t’,'-ba’));
The Return-Path value will become the address you specify in your “From” line.
Comments Off