Beefy Boxes and Bandwidth Generously Provided by pair Networks chromatic writing perl on a camel
We don't bite newbies here... much
 
PerlMonks  

Re: Send Email From Gmail

by Krambambuli (Deacon)
on Jun 19, 2010 at 12:19 UTC ( #845534=note: print w/ replies, xml ) Need Help??


in reply to Send Email From Gmail

If using Net::SMTP::TLS, the 'Hello' param says who _you_ are. So try something like

my $mailer = new Net::SMTP::TLS( 'smtp.gmail.com', Hello => 'the _host_name_you_are_coming_from', [...]


Comment on Re: Send Email From Gmail
Download Code
Re^2: Send Email From Gmail
by Adamba (Sexton) on Jun 19, 2010 at 12:58 UTC

    Thanks! but it's still giving me the connection timeout error....

      It's working!

      changed the port to 587, now everything works!

      Thank you monks! :)

        Hi, I used following code ...
        use strict; use warnings; use Net::SMTP::TLS; my $mailer = new Net::SMTP::TLS( 'smtp.gmail.com', Hello => 'localhost', Port => 25, #redundant Timeout => 30, User => 'kimuthuselvan@gmail.com', Password=> '********'); $mailer->mail('kimuthuselvan@gmail.com'); $mailer->to('kimuthuselvan@hotmail.com'); $mailer->data; $mailer->datasend("Sent thru TLS!"); $mailer->dataend; $mailer->quit;
        but it is not working for me. The error message is
        ******************************************************************* Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER together with SSL_ca_file|SSL_ca_path for verification. If you really don't want to verify the certificate and keep the connection open to Man-In-The-Middle attacks please set SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application. ******************************************************************* at C:/Apps/Perl64/site/lib/Net/SMTP/TLS.pm line 181. invalid SSL_version specified at C:/Apps/Perl64/lib/IO/Socket/SSL.pm l +ine 389.
        Please help me to fix this issue. Thank you.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://845534]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2014-04-20 06:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls