#!/usr/bin/perl use warnings; use strict; use Email::Stuff; my $body="line1\nline2\n"; my $to='jason@example.com'; #use email::stuff Email::Stuff->to($to) ->subject("hello from Email::Stuff") ->text_body($body) ->send; #use sendmail open ( MAILER, "|/usr/lib/sendmail -t" ); print MAILER "To: $to\n"; print MAILER "Subject: hello from sendmail\n"; print MAILER "$body"; close MAILER;