I was struggling with the same thing and have tried your code. I am getting strange results: sometimes I am getting encouraging codes back such as 250 ("ok") and 354 ("go ahead") but often I get 502 ("unimplemented (#5.5.1)").
There seems to be no pattern in a series of 10 emails sent out through the same connection - codes seem random and some of the email is delivered, while most is not.
Any ideas? thanks. (See below for the Debug output result after sending 2 messages -both undelivered)
Net::SMTP: Net::SMTP(2.13) Net::SMTP: Net::Cmd(2.12) Net::SMTP: Export
+er(5.562) Net::SMTP: IO::Socket::INET(1.25) Net::SMTP: IO::Socket(1.2
+6) Net::SMTP: IO::Handle(1.21) Net::SMTP=GLOB(0x104834)<<< 220 www.my
+isp.com
ESMTP Net::SMTP=GLOB(0x104834)>>> EHLO www2.myisp.net
Net::SMTP=GLOB(0x104834)<<< 250-www.myisp.com
Net::SMTP=GLOB(0x104834)<<< 250-PIPELINING
Net::SMTP=GLOB(0x104834)<<< 250 8BITMIME
Net::SMTP=GLOB(0x104834)>>> AUTH LOGIN
Net::SMTP=GLOB(0x104834)>>> ZGVsZWdhXzE=
Net::SMTP=GLOB(0x104834)>>> am93b2JvMTI=
Net::SMTP=GLOB(0x104834)>>> MAIL FROM:
Net::SMTP=GLOB(0x104834)<<< 502 unimplemented (#5.5.1)
Net::SMTP=GLOB(0x104834)>>> RCPT TO:
Net::SMTP=GLOB(0x104834)<<< 354 go ahead
Net::SMTP=GLOB(0x104834)>>> DATA
Net::SMTP=GLOB(0x104834)<<< 250 ok 1019918963 qp 4227
Net::SMTP=GLOB(0x104834)>>> To: myself@hotmail.com
Net::SMTP=GLOB(0x104834)>>> From: theprogram@mydomain.com
Net::SMTP=GLOB(0x104834)>>> Subject: first test
Net::SMTP=GLOB(0x104834)>>>
Net::SMTP=GLOB(0x104834)>>> testing...
Net::SMTP=GLOB(0x104834)>>> .
Net::SMTP=GLOB(0x104834)<<< 502 unimplemented (#5.5.1)
Net::SMTP=GLOB(0x104834)>>> AUTH LOGIN
Net::SMTP=GLOB(0x104834)>>> ZGVsZMdhXzE=
Net::SMTP=GLOB(0x104834)>>> am93b3JvMTI=
Net::SMTP=GLOB(0x104834)>>> MAIL FROM:
Net::SMTP=GLOB(0x104834)<<< 502 unimplemented (#5.5.1)
Net::SMTP=GLOB(0x104834)>>> RCPT TO:
Net::SMTP=GLOB(0x104834)<<< 502 unimplemented (#5.5.1)
Net::SMTP=GLOB(0x104834)>>> DATA
Net::SMTP=GLOB(0x104834)<<< 502 unimplemented (#5.5.1)
Net::SMTP=GLOB(0x104834)>>> To: myself@hotmail.com
Net::SMTP=GLOB(0x104834)>>> From: theprogram@mydomain.com
Net::SMTP=GLOB(0x104834)>>> Subject: second test
Net::SMTP=GLOB(0x104834)>>>
Net::SMTP=GLOB(0x104834)>>> Hi, this is another test
Net::SMTP=GLOB(0x104834)>>> .
Net::SMTP=GLOB(0x104834)<<< 250 ok
Net::SMTP=GLOB(0x104834)>>> QUIT
Net::SMTP=GLOB(0x104834)<<< 250 ok
|