SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Feb 2007
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mail() not sending to yahoo.com??

    Hello,
    I am trying to send a confirmation email with php mail(). I have read some doc on the manual, and everything seems to work ok, except that yahoo adresses don't receive my mails. not even in the bulk folder. and mail() doesn't return any error....??

    The other email adresses I tested work fine (gmail, hotmail, mydomain...)...

    here is the code:

    PHP Code:
    // against email injection
    $emailurldecode($_POST['email']);
    if (
    eregi("\r",$email) || eregi("\n",$email)) die();

    // end of lines depending on OS
    if (strtoupper(substr(PHP_OS,0,3)=='WIN')){
      
    $eol="\r\n";
    } elseif (
    strtoupper(substr(PHP_OS,0,3)=='MAC')){
      
    $eol="\r";
    } else {
      
    $eol="\n";
    }

    // Common Headers
    $headers='';
    $headers.= "From: test <test@test.com>".$eol;
    $headers.= "Reply-To: test <test@test.com>".$eol;
    $headers.= "Return-Path: No_Reply <returned_mail@test.com>".$eol;// these two to set reply address
    $headers.= "Message-ID: <".time()." TheSystem@$_SERVER[SERVER_NAME]>".$eol;
    $headers.= "X-Mailer: PHP v".phpversion().$eol;          // These two to help avoid spam-filters
    $headers.= 'MIME-Version: 1.0'.$eol;
    $headers.= 'Content-Type: Text/plain; charset=ISO-8859-1'.$eol;

    $titre="title here";

    $message"
    message here.

    thanks.
            
    "
    ;

    mail($email$titre$message$headers); 
    thanks for the help

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,426
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    If it is arriving everywhere else then it probably is a case of Yahoo simply blocking your emails.

  3. #3
    SitePoint Zealot chrisdpucci's Avatar
    Join Date
    Dec 2006
    Location
    On the internets
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, if you are on shared hosting it is highly possible that the server's IP is on Yahoo's blacklist. If thatis the case, either go dedicated or find a host who knows that they are not blacklisted.

  4. #4
    SitePoint Member
    Join Date
    Feb 2007
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    but it lets me send mails to yahoo when I am using their webmail.
    does that mean they are not blacklisted, or it has nothing to do with it?

    I notice there is a difference in the "return-path" param, when I am sending with php or with webmail (one of the many differences)

    could that matter?

  5. #5
    SitePoint Member hexed's Avatar
    Join Date
    May 2006
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your hosting could have webmail hosted on a different server, which may have a different ip adress.
    I've sent emails to yahoo from newly established co-location servers without any headers and it came through every time, just blank. So I think it's the blacklist.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •