HELO adsf
Connection closed by foreign host.

The telnet test certainly does away with any theory that the port might be blocked. It is clearly open, and there is a listener on the other end. However, your scripts go much further than this, actually attempting to negotiate an encrypted connection, log in, and even send a message. The script is likely failing at a later stage.

At this point, I would want to test the server to see if it indeed supports TLS, the authentication information you have is correct, and that you are allowed to use it to send messages. The server might be set up to hang if it's not happy with the transaction (this is a common way to slow down spambots). Unfortunately, this behaviour may mean that you won't get much in the way of useful error messages (as you've already noticed).

I've used this guide before to test SMTP servers for access. It uses command-line tools, but you can certainly use Net::SMTP for example to achieve the same. Note that this is unlikely to be an issue particular to Perl.


In reply to Re: SMTP and TLS by thewebsi
in thread SMTP and TLS by Rodster001

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.