jakebur01 Posted June 4, 2007 Share Posted June 4, 2007 ok... my form that I made will not deliver to hotmail or gmail... What is the problem?? <?php $name = $_POST['name']; $company = $_POST['company']; $phone = $_POST['phone']; $email = $_POST['email']; $feedback = $_POST['message']; $name = trim($name); $company = trim($company); $phone = trim($phone); $email = trim($email); $feedback = trim($feedback); $toaddress = 'rsmith@mysite.com'; $subject = 'Website Form - mysite.com'; $mailcontent = 'Customer name: '.$name."\n" .'Customer company: '.$company."\n" .'Customer e-mail: '.$email."\n" .'Customer phone: '.$phone."\n" ."Customer comments: \n".$feedback."\n"; // header information not including sendTo and Subject // these all go in one variable. First, include From: $fromaddress = 'From: info@mysite.com'; mail($toaddress, $subject, $mailcontent, $fromaddress); ?> Quote Link to comment https://forums.phpfreaks.com/topic/54140-mail-not-delivering-to-gmail-or-hotmail/ Share on other sites More sharing options...
JustinK101 Posted June 4, 2007 Share Posted June 4, 2007 Probably not related to php, but the SMTP server your trying to send the mail from. Also, perhaps your site is on the spam filter of yahoo and google? Quote Link to comment https://forums.phpfreaks.com/topic/54140-mail-not-delivering-to-gmail-or-hotmail/#findComment-267661 Share on other sites More sharing options...
jakebur01 Posted June 4, 2007 Author Share Posted June 4, 2007 The address i'm trying to send to is a centurytel account. If I log into the preferences... Could I just allow the server address???.... What do I type in for it to allow?? Would it be like an ip address or something? Quote Link to comment https://forums.phpfreaks.com/topic/54140-mail-not-delivering-to-gmail-or-hotmail/#findComment-267668 Share on other sites More sharing options...
jakebur01 Posted June 4, 2007 Author Share Posted June 4, 2007 i turned the filter off. The mail does not seem to be coming through. But, the e-mail is able to come through on one of my accounts. What else could I do to allow the mail to come through? Thanks, Jake Quote Link to comment https://forums.phpfreaks.com/topic/54140-mail-not-delivering-to-gmail-or-hotmail/#findComment-267678 Share on other sites More sharing options...
per1os Posted June 4, 2007 Share Posted June 4, 2007 www.php.net/mail look at the mail() function. Look at the mail headers, I suggest using almost all the headers you can to prove its not a fake email. Also note the "-f" parameter to show who the email "came from" Quote Link to comment https://forums.phpfreaks.com/topic/54140-mail-not-delivering-to-gmail-or-hotmail/#findComment-267695 Share on other sites More sharing options...
jakebur01 Posted June 4, 2007 Author Share Posted June 4, 2007 i am still not having any luck. Could you please post an example that you know works? Quote Link to comment https://forums.phpfreaks.com/topic/54140-mail-not-delivering-to-gmail-or-hotmail/#findComment-267732 Share on other sites More sharing options...
per1os Posted June 4, 2007 Share Posted June 4, 2007 <?php $to = 'nobody@example.com'; $subject = 'the subject'; $message = 'hello'; $headers = 'From: webmaster@example.com' . "\r\n" . 'Reply-To: webmaster@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers, '-fwebmaster@example.com'); ?> http://www.bath.ac.uk/bucs/email/anatomy.shtml For more indepth explanation about mail headers etc. Quote Link to comment https://forums.phpfreaks.com/topic/54140-mail-not-delivering-to-gmail-or-hotmail/#findComment-267765 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.