Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem in sending mail using perl

Status
Not open for further replies.

goodtalka

Programmer
Jun 11, 2002
12
IN
hi,
I have some problem in sending mail using perl. I used the following perl script to send the mail using my smtp server.

###########################

use Mail::Sender;

ref ($sender = new Mail::Sender { from => 'somebody@somewhere.com',
smtp => 'mail.yourISP.com', boundary => 'This-is-a-mail-boundary-435427'})
or die "Error in mailing : $Mail::Sender::Error\n";

(ref ($sender->MailMsg({to =>'Jenda@Krynicky.czX', subject => 'this is a test',
msg => "Hi Johnie.\nHow are you?"}))
and print "Mail sent OK."
)
or die "$Mail::Sender::Error\n";

###########################


I am getting an mail (subject : "Mail System Error - Returned Mail") in the senders mailbox (not in the recipient's mailbox) with the following message -

##############
This Message was undeliverable due to the following reason:

The following destination addresses were unknown (please check
the addresses and re-mail the message):

Relay Not allowed

(...........and with the subject and matter of the mail sent.....)
###########

What is wrong here??? Please help
 
try using replyto => 'youremail@isp.com'
i think it might have something to do with anti-spam efforts on your isp's part. In order to prevent people relaying email through their smtp server, they block unauthorized users.
also, check the authentication section in the documentation
 
Hi,

this problem has nothing to do with perl. Seems your script is doing what it is supposed to do.
You need to configure you mail server to allow to relay this mail.
 
Yes, not a perl problem.

I get this if I try to send mail from home using my work email address. My work ISP looks at my IP address and, knowing that it's not my *work* IP address, decides I'm not entitled to use the mail-server. Mike

"Experience is the comb that Nature gives us, after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top