> Hi all
> I am trying to send a mail with the following code and the last print
> statement doesn't print, ie, the mail is not sent.
> This code is called on submitting a form on the web
>
> open(MAIL, "/usr/sbin/sendmail -oi -t") || die "Can't open mail";
> print MAIL < To:
[EMAIL PROTECTED] (T3tsu0) writes:
> sub send_mail {
> open(MAIL,"|$mail_prog -t") || &error("unable to send mail to:
> $to_name - $to_addr");
[...]
> close(MAIL);
you really want to put error checking on the close() too. In many
cases you won't be told until then if the open fa
print MAIL "Subject: $subject\n";
print MAIL "$content\n";
close(MAIL);
print "Mail to: $to_name - $to_addr, completed.";
}
-Original Message-----
From: Aman Raheja [mailto:[EMAIL PROTECTED]]
S
Aman Raheja [[EMAIL PROTECTED]] quoth:
*>Hi all
*>I am trying to send a mail with the following code and the last print
*>statement doesn't print, ie, the mail is not sent.
*>This code is called on submitting a form on the web
*>
*>open(MAIL, "/usr/sbin/sendmail -oi -t") || di
t;
>To: [EMAIL PROTECTED], [EMAIL PROTECTED],
>[EMAIL PROTECTED], [EMAIL PROTECTED]
>Subject: problem sending mail
>Date: Wed, 10 Apr 2002 12:25:46 -0500
>
>Hi all
>I am trying to send a mail with the following code and the last print
>statement doesn't print, ie, the mail i
Hi all
I am trying to send a mail with the following code and the last print
statement doesn't print, ie, the mail is not sent.
This code is called on submitting a form on the web
open(MAIL, "/usr/sbin/sendmail -oi -t") || die "Can't open mail";
print MAIL <";
---