in reply to using the Mailer / sendmail perl module...

If you don't want to use a module, the simplest way of e-mailing to user@host.com is by calling:
sub Mail { my ( $Msg ) = @_; my $Hdr = "From: Speaker to Users\n". "To: <user\@host.com>\n". "Subject: End of Day problems\n\n"; open( SENDMAIL, "|/usr/lib/sendmail -oi -t -odq") or die( "Can't fork for sendmail: $! \n" ); print SENDMAIL $Hdr.$Msg; close(SENDMAIL) or warn "sendmail didn't close correctly!"; }

Replies are listed 'Best First'.
Re^2: using the Mailer / sendmail perl module...
by Anonymous Monk on Oct 08, 2007 at 15:09 UTC
    That works tremendously. I was pulling faces 15mins ago when I tested it, and nothing happened... 15 mins after it 'should' have arrived the email lands. So that shall be fine, it's for a midnight cron job and I'll be dammed if I'm leaping out of bed to offer support :P Thanks for everyones help!
      Sorry, I should have mentioned the delay in delivery. Like you, I use this for late night reporting where delivery time is not as critical as simply reporting the problem.

      (I do jump out bed to do support. 8-) )