#22991 [Opn]: PHP mail not being received by hotmail
| From: | rcflyer at myself dot com | Date: | Mon, 31 Mar 2003 20:28:09 +0000 |
| Subject: | #22991 [Opn]: PHP mail not being received by hotmail | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-36846@lists.php.net to get a copy of this message | ||
ID: 22991
User updated by: rcflyer at myself dot com
Reported By: rcflyer at myself dot com
Status: Open
Bug Type: Output Control
Operating System: Liniux
PHP Version: 4.3.2RC1
New Comment:
I found this information on the marcromedia site. Using the FROM
doesn't solve the problem. What else is needed?
If you've ever sent an e-mail from PHP, you know what is required.
First, the mail server must be set up correctly on the PHP server.
Next, you have to know a little bit about what is required in your mail
headers. The PHP mail() function only takes four parametersto,
subject, message, and headerbut in many cases certain headers have to
be set or the mail will not go through. Some servers will reject an
email if the FROM field is not included. For that reason, the headers
have to be manually concatenated with line feeds. Knowledge of mail
headers is necessary. Alternately, you can use a pre-written script
that you might find on the web. The same simple e-mail sent from PHP
might look like this:
Previous Comments:
------------------------------------------------------------------------
[2003-03-31 14:18:53] rcflyer at myself dot com
PHP mail() will not send to hotmail? how come?
--------------------------------------------------------------------------------
Ive tried several hotmail addresses and ive tried several normal ISP
addresses and nothing send to hotmail addresses but all messages goto
normal addresses, does anyone know how to solve this problem?
This is the function im using.
mail( '"' . $emailto . '" <' . $emailto1 . '>',
$subject, $Body,
'Return-Path: "' . $From . '" <' . $From1 . ">\n"
. 'From: "' . $From . '" <' . $From1 . ">\n"
. 'Reply-To: "' . $From . '" <' . $From1 . ">\n"
. "MIME-Version: 1.0\n Content-Type: multipart/mixed;\nX-Mailer: PHP/"
. phpversion() . "\n"
. "X-From-IP: " . $REMOTE_ADDR );
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22991&edit=1