mail() and unpredictable results

From: Date: Sat, 04 Nov 2000 04:33:27 +0000
Subject: mail() and unpredictable results
Groups: php.general 
Request: Send a blank email to php-general+get-23679@lists.php.net to get a copy of this message
hi am using sendmail with mail()... i have created a test mail program /* recipients */ $recipient = "corporate@800lbguerilla.com"; print "started mailing <BR><BR>"; /* subject */ $subject = "This is a test of the mail function"; /* message */ $message = "This is a test\n"; $message .= "of the\n"; $message .= "mail function\n"; /* auto signature */ $message .= "--\r\n"; //Signature delimiter $message .= "800 LB Guerilla"; /* additional headers */ $headers .= "From: 800 LB Guerilla.com <corporate@800lbguerilla.com>\n"; $headers .= "X-Sender: <corporate@800lbguerilla.com>\n"; $headers .= "X-Mailer: PHP\n"; // mailer $headers .= "Return-Path: <corporate@800lbguerilla.com>\n"; // Return path for errors print "right before mail<BR><BR>"; /* and now mail it */ mail($recipient, $subject, $message, $headers); print "after mail"; The script hangs the server for a couple of minutes then prints started mailing right before mail that is all... it doesn't return the last debug print but it does send the mail! it also hangs up the webserver and forces you to load another page and then it functions again... my sendmail_path is /usr/sbin/sendmail -t and my sendmail_from is no value... is there a reason that sendmail doesn't return to the php script after the mail is sent? any help is appreciated! thanks pat

« previous php.general (#23679) next »