RE: [PHP-GENERAL] Having some mail difficulties

From: Date: Wed, 31 May 2000 06:17:37 +0000
Subject: RE: [PHP-GENERAL] Having some mail difficulties
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-685@lists.php.net to get a copy of this message
> This code does not work: > // mail test - doesn't work > $mailTo = "wizaerd@wizaerd.com"; > $mailSubject = "Testing EMail"; > $mailBody = "This is a test of the EMail system from php script"; > $mailBody .= phpversion(); > > $mailHeader = "From: jsheble@zanova.com\n"; > $mailHeader .= "Reply-To: jsheble@zanova.com\n"; > $mailHeader .= "X-Mailer: PHP/" . phpversion() . "\n\n"; > > mail( $mailTo, $mailSubject, $mailBody, $mailHeader ); > > > However, this code does work: > // secondary mail test - does work > $MP = "/usr/lib/sendmail -t "; > $fd = popen($MP,"w"); > fputs($fd, "To: wizaerd@wizaerd.com\n"); > fputs($fd, "From: jsheble@zanova.com\n"); > fputs($fd, "Reply-To: jsheble@zanova.com\n"); > fputs($fd, "Subject: Test EMail\n"); > fputs($fd, "X-Mailer: PHP/".phpversion()."\n\n"); > fputs($fd, "This is a test\n"); > pclose($fd); Although I didnt think it was essential, the first noticable difference is that in the second one your body is different, and has a \n on the end. Can you see if its even sent to your sendmail?

« previous php.general (#685) next »