Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Perl and SMTP mail problems

Reply
Thread Tools

Perl and SMTP mail problems

 
 
dchirica@gmail.com
Guest
Posts: n/a
 
      06-23-2005
Hello I tryied to send messaged from a Perl script running on win32.

I have the following script modified for privacy reasons

################################################## ######
use Net::SMTP;

$smtp = Net::SMTP->new('my.domain.com', debug => 1);

print $smtp->domain, "\n";

$smtp->mail($ENV{USER});

$smtp->to('(E-Mail Removed)');

$smtp->data();

$smtp->datasend("To: my.email\@yahoo.com\n");
$smtp->datasend("From: email\@my.domain.com\n");
$smtp->datasend("\n");

# Send the body.
#
$smtp->datasend("Just a test message!\n");

$smtp->dataend();
$smtp->quit;
################################################## ##################

When I run the script from command prompt with -w option I get the
output from the print statement:
> my.domain.com

with no other errors.

Now, the problem is that I never received the messages I send to
http://www.velocityreviews.com/forums/(E-Mail Removed) (or other external email addresses).
If I change the (E-Mail Removed) with my local email address, local
to my.domain.com I do receive the messages.

Does anyone know what is the problem? I am inclined to believe is
something with my mail server which is a micro$soft exchange 5.5
running on windows server 2000

Thank you,
Dan

 
Reply With Quote
 
 
 
 
Larry
Guest
Posts: n/a
 
      06-24-2005
Probably the smtp server is rejecting the sender ($ENV{USER}). The
best way I've found to debug SMTP problems is using the telnet command
(avail. in Unix and Windows command prompt).

Here's how to use it:

http://www.yuki-onna.co.uk/email/smtp.html

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems sending mail with gmail and SMTP Mikael H. Ruby 1 02-21-2011 03:50 PM
Sending SMTP mail when SMTP server is unavailable matthewjbarr@gmail.com Java 3 01-24-2006 06:53 PM
sending of mail (smtp) - connection refused - but smtp server isrunning! Alex Hunsley Python 4 06-29-2004 04:30 PM
RE: sending of mail (smtp) - connection refused - but smtp serveris running! Raaijmakers, Vincent \(GE Infrastructure\) Python 0 06-29-2004 02:38 PM
SMTP mail, need way of making sure mail is sent Curt_C [MVP] ASP .Net 5 05-19-2004 04:23 PM



Advertisments