You are here: chfeedback not sending email to Yahoo, Hotmail, etc. « All PHP « IT news, forums, messages
chfeedback not sending email to Yahoo, Hotmail, etc.

Posted by NewbieSupreme on 06/02/06 00:34

I'm using a modified SiteWizard php feedback form to send driving directions
to email addresses entered in the Email field. It works fine when sending
the email to addresses that use my own web hosting server mail, but nothing
gets sent to a Yahoo and Hotmail address I'm using to test; no bouncebacks,
no errors, no emails being put in the Bulk or Spam folders, and the Thanks
page loads fine. I was thinking I was declaring the mailto variable wrong
in the first line, but if that were so, wouldn't it not work for any
address, including ones in the Mysite email server?

The code from the form is below (w/ site and emails changed to avoid spam):

<?


$mailto = $_POST['Email'] ;

$formurl = "http://www.Mysite.com/Form.htm" ;
$errorurl = "http://www.Mysite.com/error.htm" ;
$thankyouurl = "http://www.Mysite.com/Thanks2.htm" ;

$uself = 1;

$headersep = (!isset( $uself ) || ($uself == 0)) ? "\n" : "\n" ;
$Addy = $_POST['Addy'] ;
$Zip = $_POST['Zip'] ;
$Email = $_POST['Email'] ;
$EmailRet = 'ValidEmailReplyAddress' ;
$Name = 'ThatGuy' ;
$subject = "Directions to the event" ;
$AddressW = str_replace(" ", "+", $Addy) ;
$http_referrer = getenv( "HTTP_REFERER" );

if(getenv("HTTP_X_FORWARDED_FOR")){
$ip=getenv("HTTP_X_FORWARDED_FOR");
}
else{
$ip=getenv("REMOTE_ADDR");
}

if (!isset($_POST['Email'])) {
header( "Location: $formurl" );
exit ;
}

if ( ereg( "[\n]", $Addy ) || ereg( "[\n]", $Email ) ) {
header( "Location: $errorurl" );
exit ;
}


$messageproper =


"\n\n------------------------------------------------------------\n\n" .


"Click the link below to open MapQuest directions from your point of
departure to the event: \n\n" .
"
http://www.mapquest.com/directions/main.adp?go=1&do=nw&rmm=1&un=m&cl=EN&ct=NA&rsres=1&1ffi=&1l=&1g=&1pl=&1v=&1n=&2ffi=&2l=&2g=&2pl=&2v=&2n=&1pn=&1a=$AddressW&1c=&1s=&1z=$Zip&2pn=&2a=Address+Street&2c=&2s=&2z=14323\n" ;




ini_set ("SMTP", "mail.Mysite.com");

mail($mailto, $subject, $messageproper,
"From: \"$Name\" <$EmailRet>" . $headersep . "Reply-To: \"$Name\"
<$EmailRet>" . $headersep . "X-Mailer: chfeedback.php 2.07" );
header( "Location: $thankyouurl" );
exit ;

?>

Can anyone tell why this wouldn't work for emails outside websites I host on
a shared hosting plan? I appreciate your time and help, and any
input/advice/questions are welcome and appreciated.

Thanks for reading.


Newbie Supreme

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация