Dan,
Greetings,
This is a bit off topic, but I'll bet someone on this list knows the answer.
I'm having some trouble getting sendmail.exe to close during a perl cgi
script.
I put debug lines in a simple script reperinted at the bottom of this
letter, to track progress.
It tells me that I am successfully connecting to sendmail and gets all
the way to
"printed line 5 to send mail<br>\n"
and then chokes and the browser hangs.
The close(SENDMAIL) line of the script is not executing correctly, the
sendmail process doesn't end, and the mail never gets sent. Since i have an
or die on the open and close lines, with a fatalstoBrowser from good old
cgi:Carp so I can see a failure, I assume my open worked correctly.
I've never seen the close() command in any kind of complexity...it's so
simple and I'm boggled as to why it doesn't work.
A direct cc to both addresses would be a huge help.
allan
Allan Greenier
AutoScript Applications
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.geocities.com/~autoscript
use CGI::Carp qw(fatalsToBrowser);
$| = 1;
warn "im dead";
print "Content-type: text/html\n\n";
print "<html><body>\n";
print "Sending message<br>\n";
$mailprog = 'd:/sendmail/sendmail.exe';
print "about to open mail<br>\n";
open (MAIL, "|$mailprog -t") or die "couldn't open mail";
print "mail opened<br>\n";
print MAIL "To: Your Name <agreenier\@snet.net>\n";
print "printed a line to send mail<br>\n";
print MAIL "From: My Name <agreenier\@snet.net>\n";
print "printed line two to send mail<br>\n";
print MAIL "Subject: This is the subject\n\n";
print "printed line 3 to send mail<br>\n";
print MAIL "This is the body of the message\n";
print "printed line 4 to send mail<br>\n";
print MAIL "This is line 2\n";
print "printed line 5 to send mail<br>\n";
close (MAIL) or die "sendmail not close nice";
print "at the end<br>\n";
print "</body></html>\n";
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]