Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Perl (http://www.go4expert.com/forums/perl/)
-   -   Can any perl expert help mee plz (http://www.go4expert.com/forums/perl-expert-help-mee-plz-t16900/)

rahul_mawana 13Apr2009 15:34

Can any perl expert help mee plz
 
hello friends i m trying to send emil in perl
using smtp.gawab.com,every thing is ok not error is displayed
but email is not going successfully on reciever account ,
plz can any perl expert help mee i m in big problem plz
mail is going from my computer ,my antivirus detecting it..i m free user on www.gawab.com
i m on windows xp
this is my code
**************
Code:

use Net::SMTP;
print "Content-type:text/html\n\n";
my $debug = 1;
if($debug)
{
$| = 1;
open(STDERR,">>mail.txt");
}
#-smtp server name
my $server = "smtp.gawab.com";
#-a new object of the server
$smtp = Net::SMTP -> new($server,Debug=>1);
die "Could not connect to the server" unless $smtp;
#-authorizing entry
$smtp->auth('sender@gawab.com','password');
#-from and to
$smtp->mail("me@gawab.com"); #this is the real "from" address
$smtp->to("you@gmail.com"); #this is the real "to" address
#-message send
$smtp->data();
$smtp->datasend("To: you@gmail.com\n"); #this is the "to" address displayed in the mail
$smtp->datasend("From: me@gawab.com\n"); #this is the "from" address displayed in the mail
$smtp->datasend("Subject: Mail Test\n");
$smtp->datasend("\n");
$smtp->datasend("This is mail test number : NET-SMTP-E-PL-ROCHESU-005\n");
$smtp->datasend("\n");
($smtp->dataend();
#-quit connection to server
$smtp->quit();
@@@@@@@

plz sir help me plz

shabbir 13Apr2009 16:29

Re: Can any perl expert help mee plz
 
Couple of things.

1. Use Code blocks for Code in posts.
2. Title should be something better than what you have posted and remember that next time.


All times are GMT +5.5. The time now is 00:56.