When I use mail::sender in a .pl everything works correctly. When I compile
it I get the error "The SMTP server was not found" when the e-mail should be
sent.
If you use the following lines of code with mail::sender then you get an
e-mail to send to you. If you compile it using the PDK you will get the
error "SMTP server was not found" instead of sending an e-mail. Can anyone
see what I am doing wrong?
use Mail::Sender;
$To = "payne\@berbee.com";
$Msg = "From Test";
$Subj = "From Test";
$File = "C:\\TDPEXC.LOG";
&SendMail;
sub SendMail
{
ref ($sender = new Mail::Sender()) or print "$Mail::Sender::Error\n";
(ref ($sender->MailFile(
{to => $To,
subject => $Subj,
msg => $Msg,
file => $File,
}))
)
or print "$Mail::Sender::Error\n";
}
Kyle Payne
Berbee
4000 West Spencer Street
Appleton, WI 54914-4015
[EMAIL PROTECTED]
Office: 920.996.3107
Fax: 920.997.9719
Pager: 920.586.3014
Cell: 920.450.0413
Berbee...putting the E in business
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs