PERL mailer script problems

 
Post new topic   Reply to topic    Aprelium Forum Index -> Perl
View previous topic :: View next topic  
Author Message
rochesu
-


Joined: 06 Aug 2003
Posts: 10

PostPosted: Tue Nov 11, 2003 4:10 pm    Post subject: PERL mailer script problems Reply with quote

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.
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Thu Nov 13, 2003 3:49 am    Post subject: Re: PERL mailer script problems Reply with quote

The script is OK. The problem seems to be caused by the Yahoo Mail reader. Try giving the data->mail() and the from line:

Code:

$smtp->datasend("From: webmaster\@alumniset.com\n"); #this is the "from" address displayed in the mail


The same values. May be Yahoo is not displaying the message headers correctly because of this.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Perl All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group