N
nikko
I need to fix a script that sends out emails from my site using
Mail::Mailer and send using the smtp method (which involkes
Net::SMTP). The sender info is included in the headers and most people
have no problem. However, some companies have anti spam methods where
they reverse lookup the senders domain and for this they do not use
the header address but the SMTP MAIL FROM: address. Since this is not
set, our mail server sents this to (e-mail address removed) which
results in the lookup failing on the recipient end and the email is
dropped.
I'd rather not change the script too much and was wonderng if it is
possible to make this work with Mail::Mailer.
The code is:
my $date = "$wday $mday $mon $year $hour:$min:$sec GMT";
my $mailserver = "smtp.xyz.com";
my $mailer = new Mail::Mailer('smtp', Server => $mailserver);
my(%headers) = ('To' => "$company",
'Bcc' => "licenses\@amer.xyz.com",
'From' => "ts-systems\@xyz.com",
'Subject' => "Your Info",
'Date' => $date,
);
$mailer->open(\%headers);
I added
'mail' => "ts-systems\@xyz.com",
but this did not help.
Any ideas?
Mail::Mailer and send using the smtp method (which involkes
Net::SMTP). The sender info is included in the headers and most people
have no problem. However, some companies have anti spam methods where
they reverse lookup the senders domain and for this they do not use
the header address but the SMTP MAIL FROM: address. Since this is not
set, our mail server sents this to (e-mail address removed) which
results in the lookup failing on the recipient end and the email is
dropped.
I'd rather not change the script too much and was wonderng if it is
possible to make this work with Mail::Mailer.
The code is:
my $date = "$wday $mday $mon $year $hour:$min:$sec GMT";
my $mailserver = "smtp.xyz.com";
my $mailer = new Mail::Mailer('smtp', Server => $mailserver);
my(%headers) = ('To' => "$company",
'Bcc' => "licenses\@amer.xyz.com",
'From' => "ts-systems\@xyz.com",
'Subject' => "Your Info",
'Date' => $date,
);
$mailer->open(\%headers);
I added
'mail' => "ts-systems\@xyz.com",
but this did not help.
Any ideas?