RE: [PHP-DB] Mail() Not working

From: Date: Wed, 12 Dec 2001 04:21:09 +0000
Subject: RE: [PHP-DB] Mail() Not working
Groups: php.db 
Request: Send a blank email to php-db+get-14953@lists.php.net to get a copy of this message
not that has anything to do with databases directly... in your line; mail($email, "Test", $mesg, $from) the "$from" var is not actually supposed to be an email address (RTFM) - it is additional headers, so if you are trying to set the from address, use $from = "From: <from_email>"; that might help if PHP is checking those as valid headers(?) /beau // -----Original Message----- // From: Kevin J. Maynard [mailto:kmaynard@mac.com] // Sent: Wednesday, 12 December 2001 12:18 PM // To: PHP List // Subject: [PHP-DB] Mail() Not working // // // I have been unable to get the mail() function to work. // // my php.ini file has the following line in it: // SMTP = mail.attbi.com // // my php script is as follows: // <? // $email = "to_email"; // $from = "from_email"; // $mesg = "This is a test email. \r\n"; // // if (mail($email, "Test", $mesg, $from)) // echo "Mail Sent!"; // else // echo "Mail could not be sent..."; // ?> // // Every time I run this script, I receive "Mail could not be sent..." // // Any thoughts? // // // -- // PHP Database Mailing List (http://www.php.net/) // To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net // For additional commands, e-mail: php-db-help@lists.php.net // To contact the list administrators, e-mail: // php-list-admin@lists.php.net //

« previous php.db (#14953) next »