Help: Email problem with perl

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

sub trap_die
{
        my @param =3D @_;
        $message =3D $param[0];
        $CommandString =3D "/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


0
cshao
2/13/2002 4:00:10 PM
perl.dbi.users 11082 articles. 1 followers. Follow

2 Replies
438 Views

Similar Articles

[PageSpeed] 33

Has absolutely nothing to do with DBI.  Please do not send off topic emails
to this list.  Refer them to another list where this subject would be on
topic.

Ilya

-----Original Message-----
From: Shao, Chunning
To: dbi-users@perl.org
Sent: 2/13/02 9:00 AM
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

0
Isterin
2/13/2002 4:32:15 PM
------_=_NextPart_001_01C1B4C9.7B7C3B90
Content-Type: text/plain;
	charset="ISO-8859-1"

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:cshao@traffic.com]
Sent: Wednesday, February 13, 2002 8:00 AM
To: dbi-users@perl.org
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


------_=_NextPart_001_01C1B4C9.7B7C3B90--
0
nlr
2/13/2002 8:03:19 PM
Reply: