Hi,
Is anyone aware of any method of sending email with authentication using Net::SMTP or any other module. At this point I am experimenting trying to send email using perl v 5.6.1.
My ISP seems to require authentication when I run the script below with debug enabled.
Thanks,
Joydeep
#
# Test perl SMTP
#
use Net::SMTP;
$smtp = Net::SMTP->new("smtp.xyz.yahoo.com", Debug => 1); # connect to an SMTP server
die "Couldn't open connection: $!" if (!defined $smtp );
$smtp->mail( '[EMAIL PROTECTED]' ); # use the sender's address here
$smtp->to('[EMAIL PROTECTED]'); # recipient's address
$smtp->data(); # Start the mail
# Send the header.
$smtp->datasend("To: [EMAIL PROTECTED]");
$smtp->datasend("From: myname@xyz.net\n");
$smtp->datasend("Subject: Testing perl SMTP.\n");
$smtp->datasend("\n");
# Send the body.
$smtp->datasend("Testing perl SMTP....\n");
$smtp->dataend(); # Finish sending the mail
$smtp->quit; # Close the SMTP connection
print "Done!";
_______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
