----- Original Message -----
From: "Forrest Payne" <[EMAIL PROTECTED]>
To: "Perl PDK (E-mail)" <[EMAIL PROTECTED]>; "Perl
User (E-mail)" <[EMAIL PROTECTED]>;
"Perl Win32 Admin (E-mail)"
<[EMAIL PROTECTED]>
Sent: Saturday, February 09, 2002 10:56 AM
Subject: The SMTP server was not found, error from mail::sender


> 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";
> }
It would appear that you haven't defined the server. Add:
smtp => 'mail.yourdomain.com',

and it should work fine.
ego
Edward G. Orton, GWN Consultants Inc.
Phone: 613-764-3186, Fax: 613-764-1721
email: [EMAIL PROTECTED]

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to