Loan Tran wrote at Wed, 31 Jul 2002 16:59:50 +0200:
>
> I store a messages(4 pages in text) in a variabe and
> use sendmail to send it. The mail messages get chopped
> of but I'm not sure why.
> Can you suggest a better way to send a content of a
> text file using sendmail. Thanks in advance.
>
> Below is part of my script:
>
> ...
>
> sub sendownermail{
> my $to = $_[0];
> my $mail_message = $_[1];
> open(SENDMAIL, "|/usr/lib/sendmail -oi -t") or die
> "Cannot fork for send mail: $! \n";
> print SENDMAIL<<"EOF";
^
A miss a blank.
print SENDMAIL <<"EOF";
> From: [EMAIL PROTECTED]
^
It's not protected.
> To: $to\@test.com ; ltran\@test.com
The standard way would be
To: <$to\@test.com>, <ltran\@test.com>
> Subject: Testing
>
>
That should not be a reason to fail,
but why two empty lines ?
One is enough :-)
> $mail_message
> EOF
> close(SENDMAIL) or warn "sendmail dinnot close
> nicely";
> }# end sendownermail
Best Wishes,
Janek
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]