Posted on 2005-03-24 07:40:15-08 by rabbitrun
No Sender email address when use Net-SMTP_auth
When I used Net-SMTP_auth, the mail successfully sent, but no sender email address in the received email. Any idea? how to resolve the problem? Thanks, Keith
Direct Responses: 258 | Write a response
Posted on 2005-03-24 10:02:57-08 by alex in response to 256
Re: No Sender email address when use Net-SMTP_auth
Well, hard to guess, what your problem is. When using $smtp->mail() and $smtp->to Net::SMTP_auth sets the envelope data. Those methods have no influence on the contents of your mail. So, did the your mail have To: and From: headers? They are not auto-generated. That's the reason why I can auth myself with a vaild username (envelope from) and still write mail as billyboy@microsleuth.net (from). In other words: don't pipe your mailtext after successfuil auth, you must construct a mail with body and headers and feed that. Reread the POD and see the example line:
$smtp->datasend("To: postmaster\n");
BTW: Net::SMTP_auth is kind of obsolete now. Graham Barr's Net::SMTP now has auth support. HTH, alex.
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.