Thanks
$code or die. The readme file says version 0.7.09. The code you provided works great. My knowledge of the
ref command is lacking. But, I am still having a problem with email addresses outside of the SMTP server. I am recieving this error message
Error on myaccount@yahoo.com: Local user "myaccount@yahoo.com" unknown on host "mail.domain.com"I have also tried accounts other than yahoo. If I put the addresses into a hash such as so
#!Perl -w
use strict;
use Mail::Sender;
my $time = localtime;
my $subj_line = "Price Change Worksheet for $time";
my %file = ('employee@theirjob.com'=>'P:\\PCW1.TXT','storeowner@aol.co
+m'=>'P:\\PCW2.TXT');
my $work = 'me@work.com';
foreach (keys %file) {
my $sender = new Mail::Sender( {smtp => 'mail.domain.com',from => $wor
+k}) || die "$Mail::Sender::Error\n";
$sender->OpenMultipart( {to => $_,
subject => $subj_line});
$sender->Body;
$sender->SendLine('Here are the price change worksheets.');
$sender->SendFile(
{description => 'Text File',
encoding => 'Base64',
file => $file{$_}})
and print "Mail was sent OK." || die "$Mail::Sender::Error\n";
$sender->Close;
}
I have no problem sending mail outside of the company's mail server. WAIT!! WAIT!! I just tested that program again. It did NOT work. It gave me the error messages that I was receiving from the origin message of this thread. Okay, here is the kicker. It worked previously. The recipient of one of the mails even replied to it. Spoke with one of the Admins and was told that there is nothing wrong with the mail server. I am able to send out messages manually. Any ideas on what could be going on? Thanks again.
blacksmith