Feb 7, 2001, 5:28 PM
Post #2 of 2
I've never heard of the -f switch. A few things are wrong with your code..
Re: is this alright for sending mail?
[In reply to]
1 - No error creation if it fails.
2 - Probably should be -tf \"UltimateGamers\"
3 - Order of the header is usually To, From, Subject.
4 - Needs to be an extra line break after the header end.
5 - Not required that Body: be in there for the body to be placed.
I always use this:
open (MAIL, "|/usr/sbin/sendmail -t") || die $!;
print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n\n";
print MAIL "$body";