Perl and SMTP
From JmPm
Sending with the default program on the machine
sendmail ('recipient@his-domain.com','subject','The text...','sender@my-domain.com'); sub sendmail { my ($rec,$sub,$text,$from)=@_; my $mailprog="/usr/lib/sendmail"; open MAIL, "|$mailprog -t -n -oi"; print MAIL "To: $rec\n"; print MAIL "From: $from\n"; print MAIL "Reply-To: $from\n"; print MAIL "Subject: $sub\n\n"; print MAIL "$text\n"; close MAIL; return; }