i m searching from 25 days a simple perl script to send mail in perl,..
i tried many mail server as yahoo,gmail,rediff,and so many,but i couldn't got success,
so any body can tell me any mail server by that i can send mail in perl,my perl script is right but i don't have any smtp server that can be used to send mail in perl,
i want to send mail my self,but i don't know any smtp server,
i m ready to make account on that mail server what i will use to send mail....
plz plz plz plz plz sir help meee plz i m on windows xp sp2..
here is my code***
Code:
use Net::SMTP;
use MIME::Base64;
$message="From: ".'senderdomain.com'."\nTo: ".'reciever@domain.com'."\n"."Subject: Hello\n\nTest\n\n";
print $message;
print "\n";
my $DEBUG = 1;
my $ServerName = 'my mail server';
my $ServerAccount = encode_base64('XXXXX');
my $ServerPwd = encode_base64('XXXXX');
my $MailFrom = '$sender';
my $MailTo = '$reciever';
print "Server variables assigned\n";
my $smtp = Net::SMTP->new($ServerName, Hello => "domain.com", Debug => 1);
die "Couldn't connect to server" unless $smtp;
print "Server connection opened\n";
if ( !$smtp->auth($ServerAccount, $ServerPwd) ) {
print "authentication failed or not needed\n";
}
if ( !$smtp->mail( $MailFrom ) ) {
print "sender not accepted\n";
exit 1;
}
if (!$smtp->to( $MailTo ) ) {
print "addressee not accepted\n";
exit 1;
}
print "Server variables checked\n";
my $maildata = $message;
$smtp->data();
$smtp->datasend( $maildata );
$smtp->dataend();
$smtp->quit();
$smtp->quit;
print "Finished sending email\n";
plz help sir plz sir plz

