We now return you to the original problem!
I got the sample that Gunnar posted using Mail::Sender to
work after I played around with cpan and got it installed.
Now I have discovered a new problem. The SMTP server does
not respond on the first try all the time. (I think this is
a local problem, but I need to replace my gateway/firewall
server to solve ti.) It returns a message
Cannot send mail: Service not available. Reply:
This comes from the internals of Mail::Sender. I found the
place and it is trying to print some status code or return
code right after "Reply:" but there isn't anything there.
This is probably why the error exit at the end of the my
test code isn't triggered.
Here is my code:
ref (new Mail::Sender -> MailMsg( {
smtp => 'smtpout.secureserver.net',
port => '3535', # or whatever
auth => 'LOGIN',
authid => 't...@mgssub.com',
authpwd => 'mypasswd',
from => 'w...@mgssub.com',
to => 'den...@wicksclan.com',
subject => 'Yet another test!',
msg => "$msg",
} )) or die "Cannot send mail: $Mail::Sender::Error\n";
Now the question is, how can I trap that error message from
the Mail::Sender module and repeat as needed?
Thanks for all the help!
Dennis
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/