bdegan2 has asked for the wisdom of the Perl Monks concerning the following question:

Hello

So we upgraded NET::SMTP to version 3.10 and I sent out my first email as a test calling $msg->starttls(); and this is the debug trace. Does this look like it used the TLS protocol? Thanks in advance in case this listing is too long:

Hello, I have the updated Net::SMTP working with version 3.10 ... :) I have the results of the connection. It looks like I am sending out the STARTTLS and wanted to get your opinion that I did connect using TLS ?? Here is the debug:

Net::SMTP>>> Net::SMTP(3.10) Net::SMTP>>> Net::Cmd(3.10) Net::SMTP>>> Exporter(5.58) Net::SMTP>>> IO::Socket::INET(1.31) Net::SMTP>>> IO::Socket(1.31) Net::SMTP>>> IO::Handle(1.28) Net::SMTP=GLOB(0x83f812c)<<< 220 rs-ord-mtsp-mta02-in2.int.smtp.com ES +MTP (SMTP.com v6) Net::SMTP=GLOB(0x83f812c)>>> EHLO oh01lx03.workflowone.net Net::SMTP=GLOB(0x83f812c)<<< 250-rs-ord-mtsp-mta02-in2 says EHLO to 19 +8.187.174.15:46786 Net::SMTP=GLOB(0x83f812c)<<< 250-AUTH=CRAM-MD5 LOGIN PLAIN Net::SMTP=GLOB(0x83f812c)<<< 250-AUTH CRAM-MD5 LOGIN PLAIN Net::SMTP=GLOB(0x83f812c)<<< 250-STARTTLS Net::SMTP=GLOB(0x83f812c)<<< 250-8BITMIME Net::SMTP=GLOB(0x83f812c)<<< 250-ENHANCEDSTATUSCODES Net::SMTP=GLOB(0x83f812c)<<< 250 PIPELINING Net::SMTP=GLOB(0x83f812c)>>> STARTTLS Net::SMTP=GLOB(0x83f812c)<<< 220 2.0.0 continue Net::SMTP::_SSL=GLOB(0x83f812c)>>> EHLO oh01lx03.workflowone.net Net::SMTP::_SSL=GLOB(0x83f812c)<<< 250-rs-ord-mtsp-mta02-in2 says EHLO + to 198.187.174.15:46786 Net::SMTP::_SSL=GLOB(0x83f812c)<<< 250-ENHANCEDSTATUSCODES Net::SMTP::_SSL=GLOB(0x83f812c)<<< 250-PIPELINING Net::SMTP::_SSL=GLOB(0x83f812c)<<< 250-8BITMIME Net::SMTP::_SSL=GLOB(0x83f812c)<<< 250-AUTH=CRAM-MD5 LOGIN PLAIN Net::SMTP::_SSL=GLOB(0x83f812c)<<< 250 AUTH CRAM-MD5 LOGIN PLAIN Net::SMTP::_SSL=GLOB(0x83f812c)>>> AUTH CRAM-MD5 Net::SMTP::_SSL=GLOB(0x83f812c)<<< 334 PDIwMDI0NjMzLjE1MDIyMjE0NTlAcnM +tb3JkLW10c3AtbXRhMDItaW4yPg== Net::SMTP::_SSL=GLOB(0x83f812c)<<< (decoded) <20024633.1502221459@rs-o +rd-mtsp-mta02-in2> Net::SMTP::_SSL=GLOB(0x83f812c)>>> (decoded) SencoBrands 79ea0fef2dad0 +1e3eafd5ad71103f681 Net::SMTP::_SSL=GLOB(0x83f812c)>>> U2VuY29CcmFuZHMgNzllYTBmZWYyZGFkMDF +lM2VhZmQ1YWQ3MTEwM2Y2ODE= Net::SMTP::_SSL=GLOB(0x83f812c)<<< 235 2.0.0 Authed. Go on.

thanks again for your help with all this.

2017-08-09 Athanasius added code tags

Replies are listed 'Best First'.
Re: NET::SMTP with TLS
by noxxi (Pilgrim) on Aug 09, 2017 at 06:08 UTC
    The essential part is this:
    >>> STARTTLS Net::SMTP=GLOB(0x83f812c) <<< 220 2.0.0 continue Net::SMTP::_SSL=GLOB(0x83f812c) >>> EHLO oh01lx03.workflowone.net Net::SMTP::_SSL=GLOB(0x83f812c)
    This means you successfully send the STARTTLS command, got a successful response and issued a new EHLO inside the TLS upgraded connection. If you want to be really sure you could also ask for the cipher used within the connection, e.g.:
    my $smtp = Net::SMTP->new(...); $smtp->starttls or die; print "encrypting with cipher=".$smtp->get_cipher."\n";
Re: NET::SMTP with TLS
by stevieb (Canon) on Aug 08, 2017 at 23:39 UTC

    Please edit your question, and put <code></code> tags around your code, any input data, and any expected output.

    Cheers,

    -stevieb

Re: NET::SMTP with TLS
by bdegan2 (Sexton) on Aug 09, 2017 at 16:58 UTC
    Thank noxxi. That is great news.