#this is my sub for sending the email sub sendMail{ # application object my $self = shift; # get arguments my ($to, $from, $subject, $text) = @_; open (MAIL, "|/usr/lib/sendmail -t -oi") or die("Can not find sendmail: $!"); print MAIL <<_MAIL_; Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable To: $to From: $from Cc: Subject: $subject $text _MAIL_ close MAIL; }