in reply to help with scp error codes

Another 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!"; }