Problems with Mail::Mailer

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top