
Adamba
Novice
Jun 16, 2010, 11:38 AM
Post #1 of 11
(1443 views)
|
|
Send Mail from Hotmail SMTP
|
Can't Post
|
|
Hey, i'm trying to make a script that sends an email from Hotmail to any other email account. I dunno why, but it doesn't work... can anyone check out why...? I think the problem is maybe with the port or the starttls security that (I think) microsoft uses... Should I use some other module? (Sorry for my english...)
#!/usr/bin/perl use strict; use warnings; use Email::Send; use Email::Simple::Creator; my $Hotmail = Email::Simple->create( header => [ From => 'you@hotmail.com', To => 'someone@gmail.com', Subject => 'Test Hotmail', ], body => 'The server is down. Start panicing.', ); my $sender1 = Email::Send->new( { mailer => 'SMTP', mailer_args => [ Host => 'smtp.live.com:25', ssl => 1, username => 'username@hotmail.com', password => 'password', ] } ); eval { $sender1->send($Hotmail) }; die "Error sending email: $@" if $@;
|