use Net::SMTPS for specifying ssl version v1
I am migrating a couple of my domains from mandrill to sparkpost
Net::SMTP by default uses SSLv3 which is not allowed by many providers due to the poodle vulnerability . I had a problem with sparkpost API and had to use Net::SMTPS which is a wrapper for Net::SMTP and you can specify the SSL version.
my $USERNAME = 'SMTP_Injection';
my $PASSWORD = '
my $smtps = Net::SMTPS->new("smtp.sparkpostmail.com", Port => 587, doSSL => 'starttls', SSL_version=>'TLSv1');
$smtps->auth ( $USERNAME, $PASSWORD ) or DIE("Could not authenticate with gmail.\n");
my $msg =
'To: email@example.com'."\r\nFrom: ".'firstname.lastname@example.org'."\r\n\r\n Hello From the other side";
$smtps->datasend( $msg );