initself has asked for the wisdom of the Perl Monks concerning the following question:
Update: brian_d_foy has created a patch to Net::SMTP that solves my problem. Hopefully it will be applied to CPAN in the next few days. Thanks, brian!
I am attempting to use Email::Stuff to send a secure SMTP email through my GMail account. Here's the code:
#!/usr/bin/perl use warnings; use strict; use Email::Stuff; my $return = Email::Stuff->to('test@mikebaas.com') ->from('mike@mikebaas.com') ->subject('Test Subject') ->text_body('This is a test.') ->send('SMTP', Host => smtp.gmail.com:465', ssl => 1, username => mike@mikebaas.com', password => 'x', );
Simple enough, right?
The result I continue to see:
Couldn't connect to smtp.gmail.com:465 at testmail.pl line 15.As far as I know, I have the parameters for Email::Send::SMTP (which is what Email::Stuff inevitably uses to send this message) correct. Plus, the docs for Email::Send::SMTP are clear that with the right parameters, a secure email can be sent:
Any arguments passed to send will be passed to Net::SMTP->new(), with some exceptions. username and password, if passed, are used to invoke Net::SMTP->auth() for SASL authentication support. ssl, if set to true, turns on SSL support by using Net::SMTP::SSL.Can anyone see where I might have gone astray?
|
|---|