Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: SMTP problem

by mattriff (Chaplain)
on Nov 01, 2004 at 16:59 UTC ( [id://404345]=note: print w/replies, xml ) Need Help??


in reply to SMTP problem

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:

HELO your.server.name MAIL FROM: your@email.addr RCPT TO: their@email.addr DATA Subject: your e-mail here testing .
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://404345]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-24 06:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found