Perl and SMTP mail problems

D

dchirica

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 address 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
(e-mail address removed) (or other external email addresses).
If I change the (e-mail address 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top