rochesu -
Joined: 06 Aug 2003 Posts: 10
|
Posted: Tue Nov 11, 2003 4:10 pm Post subject: PERL mailer script problems |
|
|
I have a peculiar problem. Recently, i have written a perl program for sending mails. Since i have win98 OS, my script is as follows :
#####################**ALUMNISET MASS MAILER SCRIPT**########################
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([my login id],[my password]);
#-from and to
$smtp->mail("rochesu\@gawab.com"); #this is the real "from" address
$smtp->to("rochesu2netfirms\@india.com"); #this is the real "to" address
#-message send
$smtp->data();
$smtp->datasend("To: rochesu2netfirms\@india.com\n"); #this is the "to" address displayed in the mail
$smtp->datasend("From: webmaster\@alumniset.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();
## - SCRIPT end.
Now, i have an account in the smtp server of gawab.com . Iam sending the mail to an account in india.com . The "from", "to" and "subject" lines are correctly displayed. But, if i send the same mail to an account in the yahoo.com , the "from", "to" and "subject" lines are not displayed at all. But they appear in the mail message, but do not appear in the inbox. In the inbox, if we see, the sender's place remains empty and the subject place shows "none".
What could be the problem ? What should i do to ensure such errors to not occur ? Iam using this script to send message to members of a alumni association, whose mailing list is maintained by me.
Iam not an advanced perl programmer. Iam just a beginner, so please help me. |
|