Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Send Email From Gmail

by Adamba (Sexton)
on Jun 19, 2010 at 11:53 UTC ( #845529=note: print w/ replies, xml ) Need Help??


in reply to Send Email From Gmail

Update! I've succeded sending mail from gmail with Net::SMTP::SSL

Now I need to send from hotmail, as I read it uses the TLS connection... I've tried to use again the Net::SMTP:TLS module, but again I get a connection timed out error...

Anyone Succeded sending email from Hotmail using Net::SMTP::TLS?

use strict; use warnings; use Email::Simple; use Net::SMTP::SSL; use Net::SMTP::TLS; my $to = 'someone@example.com'; my $msg = "Test"; my $from = 'username@hotmail.com>'; my $smtphost = 'smtp.live.com'; my $subject = 'Test Hotmail'; my $Hotmail = new Net::SMTP::TLS( 'localhost', Hello => 'smtp.live.com', Port => 25, Debug => 1, User => 'username@hotmail.com', Password=> 'password' ); $Hotmail->mail($from); $Hotmail->to($to); $Hotmail->data(); $Hotmail->datasend("From: " . $from . "\n"); $Hotmail->datasend("To: " . $to . "\n"); $Hotmail->datasend("Subject: " . $subject . "\n"); $Hotmail->datasend("\n"); $Hotmail->datasend($msg . "\n"); $Hotmail->dataend(); $Hotmail->quit;


Comment on Re: Send Email From Gmail
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (20)
As of 2015-07-06 17:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (79 votes), past polls