Print

Print


On Mon, Jan 05, 2004 at 03:08:14PM -0500, Kenneth R. Irwin wrote:
> $mailTo = "[log in to unmask]";
> $mailSubject = "php mail test";
> $mailBody = "does this work?";
> $mailHeaders = "From: [log in to unmask]";
>
> if( mail($mailTo, $mailSubject, $mailBody, $mailHeaders))
> {
>   print "Mail successfully sent to $mailTo.";
> }
> else { print "Mail could not be sent to $mailTo."; }

I think you may need a \r\n in the headers portion.

    $mailHeaders = "From: [log in to unmask]\r\n";

PHP's mail() function is a wrapper around Sendmail. Are you certain that
your new server has sendmail available? More details on the environment
settings that control Sendmail can be found here:

     http://www.php.net/manual/en/ref.mail.php

//Ed