develooper Front page | perl.perl6.users | Postings from August 2017

Re: How do I do SSL/TLS with eMail::MIME ?

Thread Previous | Thread Next
From:
ToddAndMargo
Date:
August 20, 2017 04:55
Subject:
Re: How do I do SSL/TLS with eMail::MIME ?
Message ID:
7d76b419-7e7d-c2c2-0bec-fa3f937448e6@zoho.com
On 08/19/2017 09:51 PM, Brandon Allbery wrote:
> On Sun, Aug 20, 2017 at 12:41 AM, ToddAndMargo <ToddAndMargo@zoho.com 
> <mailto:ToddAndMargo@zoho.com>> wrote:
> 
>     $client = Net::SMTP.new(:server( $smtp ), :port( $port ), :ssl,
>     :starttls, :debug( 1 ) )
> 
> 
> I think you only want :starttls. :ssl tells it to expect a socket that 
> immediately negotiates SSL; the error suggests the mail server doesn't. 
> (Note that, because SSL is negotiated immediately, it must use different 
> ports; in general, a mail server that supports SSL uses port 465 instead 
> of 25, because it can't do SSL and non-SSL on the same port.)
> 
> Also, SSL as such isn't used that much beyond HTTPS. Modern mail servers 
> are more likely to use negotiated encryption (STARTTLS) instead. So just 
> :starttls and not :ssl.
> 
> -- 
> brandon s allbery kf8nh                               sine nomine associates
> allbery.b@gmail.com <mailto:allbery.b@gmail.com> ballbery@sinenomine.net 
> <mailto:ballbery@sinenomine.net>
> unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

If I remove the :ssl and leave :starttls, it just hangs

Tears.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About