use strict; my $sendmail = "/usr/sbin/sendmail -t"; my $from = 'me@mycompany.com'; my $to = 'you@yourcompany.com'; my $reply_to = 'me@mycompany.com'; my $subject = "Subject goes here"; my $body = "Body goes here."; open(SENDMAIL, "|$sendmail") or die "Cannot open $sendmail: $!"; print SENDMAIL "From: $from\n"; print SENDMAIL "To: $to\n"; print SENDMAIL "Reply-to: $reply_to\n"; print SENDMAIL "Subject: $subject\n"; print SENDMAIL "Content-type: text/plain\n\n"; print SENDMAIL $body; close(SENDMAIL);