|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-05-31 07:18 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 23 14:00:02 2025 UTC |
Description: ------------ PHP version: 4.3.8-2.1 I am emailing the results of a form... it always looks like it succeeds... If I put in my yahoo account, it shows up right away. If I put in the address it needs to go to, it never shows up there. If I send a test from my yahoo account to the address it needs to go to, it shows up right away. I also tested the form to another address - no email shows up. I tested again to my yahoo account, shows up immediately. Why would the email succeed to some addresses and not others? FYI, the FROM address is valid. Reproduce code: --------------- <? if(!empty($_POST)) extract($_POST); function param($Name, $http_vars) { global $HTTP_POST_VARS; if(isset($HTTP_POST_VARS[$Name])) return($HTTP_POST_VARS[$Name]); return(""); } if ($Sign_Me_Up == "") {$Sign_Me_Up="No";} else $Sign_Me_Up="Yes, $Sign_Me_Up"; $from = "email@domain.com"; $to = "email@domain.com"; $subject = "request - destination: $PopularDestinations"; $body = "Source = $source\r\n First Name = $First_Name\r\n etc..."; if($from != "" && $to != "" && $subject != "") { $headers = "From: " . $from . "\n" . "To: " . $to . "\n" . "CC: " . $cc . "\n" . "BCC: " . $bcc; $formsent= mail("", $subject, $body, $headers); if ($formsent == 1) { print("Thank you for your request, we will respond to you shortly."); } else print("I'm sorry, there's a problem with your form. Please try again."); } ?> Expected result: ---------------- I expect to get the Thank You statement and receive the email Actual result: -------------- email works only for some addresses.