Hi As far as high know yahoo server doesn't support SSL. Moreover to access yahoo smtp server via script you have to pay some monthly price. Try using Net::SMTP for some server other than yahoo & check whether your script works or not.
Also FYI, Gmail server supports SSL. Thanks Sanket Vaidya -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Bilashi Sahu Sent: Tuesday, January 06, 2009 6:47 AM To: [email protected] Subject: send mail using Net::SMTP::SSL 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 http://www.patni.com World-Wide Partnerships. World-Class Solutions. _____________________________________________________________________ This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at [email protected] and delete this mail. _____________________________________________________________________ _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
