IvanH has asked for the wisdom of the Perl Monks concerning the following question:
I have some, but limited, experience with PERL. I am trying use Email::Send::SMTP::Gmail to send emails. I tried using the sample code provided with the module but can't get it to work. My OS is Windows 8.1, 64 bit. Here is the code I used (but with my real password:
use strict; use warnings; use Email::Send::SMTP::Gmail; my $mail=Email::Send::SMTP::Gmail->new( -smtp=>'smtp.gmail.com', -login=>'IHipschman@gmail.com' +, -pass=>'mypassword'); $mail->send(-to=>'IHipschman@yahoo.com', -subject=>'Hello!', -body=>'Just testing it<br>Bye!',-contenttype=>'text/html' +); $mail->bye;
The response I receive is:
.C:\Users\Ivan\Documents\BSA\EMAIL\GmailSend>perl tryitmodified.pl Could not connect to SMTP server Can't call method "send" without a package or object reference at tryi +tmodified. pl line 8.
Can anyone suggest what the problem is? I have tried running from an administrator level command prompt and turning off the Windows firewall.
Thanks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Problem using Gmail Send
by kcott (Archbishop) on Jul 20, 2014 at 05:13 UTC | |
Re: Problem using Gmail Send
by roboticus (Chancellor) on Jul 19, 2014 at 22:54 UTC | |
Re: Problem using Gmail Send
by tbone654 (Beadle) on Jul 20, 2014 at 14:04 UTC | |
by IvanH (Acolyte) on Jul 24, 2014 at 01:04 UTC | |
Re: Problem using Gmail Send
by xyzzy (Pilgrim) on Jul 21, 2014 at 01:47 UTC |