This is slightly off-track for the list but try something like this:

   open (MAIL,"|/usr/bin/mailx -s 'Error Notification' cshao\@traffic.com");
   print MAIL "$message";
   close (MAIL);

-----Original Message-----
From: Shao, Chunning [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 8:00 AM
To: [EMAIL PROTECTED]
Subject: Help: Email problem with perl


When we need to send result through email, we use sub-function like
this:

sub trap_die
{
        my @param = @_;
        $message = $param[0];
        $CommandString = "/bin/mailx -s \"$message\" cshao\@traffic.com
</dev/null";
        system ( $CommandString );
}

 trap_die ("$instance[$i].$owner.$table is chained\n");

But the message is only in the title, if it is long message, I can only
get part of it. how should I change the the trap_die function so that
the message will appear in the body, so that I can send more result?

Thanks

Reply via email to