#!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);