Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 surveying the Monastery: (14)
As of 2014-08-29 12:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (280 votes), past polls