XP is just a number | |
PerlMonks |
Re: SMTP problemby mattriff (Chaplain) |
on Nov 01, 2004 at 16:59 UTC ( [id://404345]=note: print w/replies, xml ) | Need Help?? |
Try checking the return values of the calls to mail() and
to() -- it is most likely rejecting the data being sent
at one of those points (at least for the last set of
errors).
Because of that, your request to send data is similarly
denied, so when you are sending the headers, it is still
trying to read them as SMTP commands, which they of
course are not. This is probably not a Perl issue at all -- just an issue of what the SMTP server will accept. You can telnet to port 25 of the mail server manually and see for yourself, sending from your end:
After the helo,mail and rcpt commands, you should get a return code of 250 (ok), or one that starts with 4 (temporary denial), or 5 (permanent denial) and some text description of the action. The helo is usually a gimme, but that first error message you get in the browser might suggest it's comparing the answer you give here to the reverse lookup of the IP you are connecting from and denying because they don't match. After the DATA command, you should get a 354 return code if it's going to accept your mail. After terminating the mail with a line that's just a dot and return, you'll again get a 250 for ok or a temporary or permanent failure message. This is a bit of a simplification of things -- for more than you really want to know, see RFC 821.
In Section
Seekers of Perl Wisdom
|
|