Hi Monks-
I am using Mail::Sendmail to send email from my script. It only works if I send to addresses on our domain (my co-workers). I cannot send out to my personal email address (like hotmail or yahoo). I don't know much about smtp or email in general. Does anyone have any ideas for how to approach this issue?
#!c:/Perl/bin/perl.exe -w
use strict;
use Mail::Sendmail;
my $recipient = 'me@hotmail.com';
my $sender = 'me@officedomain.com';
my %mail = (
From => $sender,
To => $recipient,
Subject => "I'm sending you mail",
Message => "This is the message body\n",
smtp => 'smtp.officedomain.com'
);
sendmail (%mail) or die "sendmail failure sending to $mail{To}: $!\n";
print "End of program.\n";
exit(0);