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

In reply to Re: Re: Re: SMTP and Authentication WITH USING Net::SMTP by ljhog
in thread SMTP and Authentication by mdog

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.