Hi, I am trying to write a simple script to send email from Yahoo mail server and get "Authentication Failed" message. I could not figure out where I am doing wrong. Can you please look into it. I appreciate for your help.
Using this info for Yahoo SMPT server from http://help.yahoo.com/help/us/mail/pop/pop-11.html thanks, Bilashi Here is my code #!/usr/bin/perl -w use strict;use warnings; use Net::SMTP::SSL; my $username = "bilashi";my $passwd = "mysecretpasswd"; my $from = '[email protected]'; my $to = '[email protected]'; my $smtphost = 'plus.smtp.mail.yahoo.com'; my $msg = "How are you?"; my $smtp = Net::SMTP::SSL->new($smtphost, Port => 465, Debug => 1) or die "Net::SMTP::SSL::new: $!"; $smtp->auth($username,$passwd) || die "Authentication failed\n"; $smtp->mail($from); $smtp->to($to); $smtp->data(); $smtp->datasend($msg); $smtp->dataend(); exit; When I ran the program got following perl sendmail.pl Net::SMTP::SSL>>> Net::SMTP::SSL(1.01) Net::SMTP::SSL>>> IO::Socket::SSL(1.14) Net::SMTP::SSL>>> IO::Socket::INET(1.31) Net::SMTP::SSL>>> IO::Socket(1.30) Net::SMTP::SSL>>> IO::Handle(1.27) Net::SMTP::SSL>>> Exporter(5.58) Net::SMTP::SSL>>> Net::Cmd(2.29) Net::SMTP::SSL=GLOB(0x9387414)<<< 220 smtp103.prem.mail.sp1.yahoo.com ESMTP Net::SMTP::SSL=GLOB(0x9387414)>>> EHLO localhost.localdomain Net::SMTP::SSL=GLOB(0x9387414)<<< 250-smtp103.prem.mail.sp1.yahoo.com Net::SMTP::SSL=GLOB(0x9387414)<<< 250-AUTH LOGIN PLAIN XYMCOOKIE Net::SMTP::SSL=GLOB(0x9387414)<<< 250-PIPELINING Net::SMTP::SSL=GLOB(0x9387414)<<< 250 8BITMIME Authentication failed _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
