Greetings, Excuse me if this is a repeat post. Script at the bottom of this letter. I'm having trouble with a simple cgi using sendmail.exe. 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. I can't imagine why the close command isn't working...it's so simple and I even follow it with an or die, which would at least report that. If I comment out the close line the cgi prints all lines and returns control to the browser. Why won't sendmail close? Allan Greenier [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.geocities.com/~autoscript use CGI::Carp qw(fatalsToBrowser); $| = 1; 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: [[email protected]] To unsubscribe, forward this message to [EMAIL PROTECTED] For non-automated Mailing List support, send email to [EMAIL PROTECTED]
