use strict; use warnings; use Email::Send::SMTP::Gmail; my ($mail,$error)=Email::Send::SMTP::Gmail->new ( -smtp=>'smtp.gmail.com', -login=>'MYGMAILNAME@gmail.com', -pass=>'MYPASSWORD', -port=>587, -layer=> 'tls', -verbose=>1, -debug=>1 ); #### Net::SMTPS=GLOB(0x2c8b140>>>> STARTTLS Net::SMTPS=GLOB(0x2c8b140>>>> 220 2.0.0 Ready to start TLS DEBUG: .../IO/Socket/SSL.pm:525 global error: SSL Version SSLv2 not supported Could not connect to SMTP server