ID: 22991 Comment by: rivera_karina at hotmail dot com Reported By: rcflyer at myself dot com Status: Bogus Bug Type: Mail related Operating System: Liniux PHP Version: 4.3.2RC1 New Comment:
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 ); Previous Comments: ------------------------------------------------------------------------ [2003-03-31 15:01:23] [EMAIL PROTECTED] Your first problem is that you're attempting to specify realname in the $to parameter of mail(). Don't do that. The first parameter of mail() should be an email address and ONLY an email address. That much aside everything you have (From/Return-Path/etc..) should be enough, however, your mail server may be setup to not trust those headers from the user. Look for a setting of 'trusted-users' or similar in your mail server configuration and make sure your webserver user is listed in there. All that said, any further comments on this 'bug' should be discussed on [EMAIL PROTECTED] as this is not a bug, but rather a scripting problem. P.S. - 'Output Control' is not the correct category for this report either. This should have been submitted under 'Mail Related'. I'm changing that now so that our stats are keep consistent. ------------------------------------------------------------------------ [2003-03-31 14:28:08] rcflyer at myself dot com 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 parameters�to, subject, message, and header�but 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: ------------------------------------------------------------------------ [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
