+ Reply to Thread
Results 1 to 4 of 4

Thread: Perplexing PHP mail from address not getting through if major domain like yahoo

  1. #1
    fukufuji is offline x10Hosting Member fukufuji is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    8

    Perplexing PHP mail from address not getting through if major domain like yahoo

    Hi I have a PHP form that I debugged and is working now but I still don't understand the root cause. I build the email msg header to include a "From e-mail address". This string comes in by user input in the Email field on the HTML form.

    $headers = 'From: '.$email_from."\r\n"

    If the e-mail address happens to be from a major mail domain like yahoo or hotmail I will not receive the e-mail in my Gmail account (the PHP mail msg send destination). So for example if a person types in the from email address tito897@yahoo.com and submits the form the mesage will never arrive, The same goes for Hotmail, Gmail, etc... However if it were tito987@ahoo.com or tito@fakedomain.com it gets to my Gmail.

    I worked around it by hard coding the from address to a non-major mail carrier domain and I know get all mail it just comes under this address below.

    $headers = "From: A-PERSON@website.com\n";

    Is GMAIL not accepting the messages becasue it can tell they are not really coming from Yahoo or Hotmail etc... The PHP code would actually fire off the mail from x10hosting servers and I am wondering if when Gmail gets it, the Gmail servers are looking for some kiond of predefinde yahoo handshake and when its not there its denying the mail msg. This was the only guess I could come up with.:dunno:
    Last edited by fukufuji; 12-08-2009 at 09:04 PM.

  2. #2
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Perplexing PHP mail from address not getting through if major domain like yahoo

    Just tested sending (via PHP script on my x10 site) to my gmail account using my hotmail account address in the "From" field, and it went through.

    But people have reported that they could send emails with 3rd party "From" addresses for awhile, then they stopped. Staff hasn't said as much, but I think the system might be set up to stop such emails to prevent spamming and phishing or other abuse.

    Just set the "From" field to an address attached to your domain (and put your visitor's email address in the body of the message). That usually fixes the problem.
    Last edited by descalzo; 12-08-2009 at 09:43 PM.

  3. #3
    freecrm's Avatar
    freecrm is offline x10 Elder freecrm is an unknown quantity at this point
    Join Date
    May 2008
    Location
    UK
    Posts
    629

    Re: Perplexing PHP mail from address not getting through if major domain like yahoo

    gmail is pretty good at receiving mail, but yahoo and others are more sensitive and check if the source is the same as the "from"

    I also tried X-sender, but this doesn't work all the time either.

    There are also a number of mail servers that have blacklisted mail coming from x10 servers. I have a CRM system with mailshot function and some of my users complain about this. I also have the same problem with registration validation mails.

  4. #4
    fukufuji is offline x10Hosting Member fukufuji is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    8

    Re: Perplexing PHP mail from address not getting through if major domain like yahoo

    Thanks for the feedback guys for a while I thought I was going bonkers. Glad I posted.

    I am certainly going to implement this fix, I don't need to reply to the email I receive just want to keep it on file and have it seperate in its own gmail thread and this will work great.

    Quote Originally Posted by descalzo View Post
    Just set the "From" field to an address attached to your domain (and put your visitor's email address in the body of the message). That usually fixes the problem.

+ Reply to Thread

Similar Threads

  1. PHP mail()
    By merrillmck in forum Programming Help
    Replies: 11
    Last Post: 07-14-2009, 02:59 PM
  2. Help setting up recently enabled PHP Mail
    By ipodtouchforum in forum Free Hosting
    Replies: 11
    Last Post: 06-24-2009, 11:10 PM
  3. Need help with PHP script for IP address of sites
    By phpasks in forum Programming Help
    Replies: 3
    Last Post: 05-09-2008, 08:15 AM
  4. Unstand PHP?
    By o0slowpaul0o in forum Tutorials
    Replies: 8
    Last Post: 01-07-2008, 09:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers