Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6986515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:49:08+00:00 2026-05-27T18:49:08+00:00

I try to send a mail via php to an yahoo recipient. Every time

  • 0

I try to send a mail via php to an yahoo recipient.
Every time I connect to yahoo I get a 250 status code for the recipient address, even if it doesn’t exist. I found a script which get the correct status code from yahoo, but I cannot find the differences or mistakes I did in my script. I tried to send different commands and run the script on several servers, but I always get a 250 response for the RCPT-TO-command.
Why do I don’t get the correct response? I want to stop my script when a recipient doesn’t exist!

Log of verify-email.org which gets the correct response:

MX record about yahoo.com exists.
Connection succeeded to g.mx.mail.yahoo.com SMTP.
=220 mta1062.mail.sp2.yahoo.com ESMTP YSmtp service ready
> HELO verify-email.org
=250 mta1062.mail.sp2.yahoo.com
> MAIL FROM: <check@verify-email.org>
=250 sender <check@verify-email.org> ok
> RCPT TO: <sdjrfvn3r@yahoo.com>
=554 delivery error: dd This user doesn't have a yahoo.com account (sdjrfvn3r@yahoo.com) [0] - mta1062.mail.sp2.yahoo.com

Log of my script which gets the wrong response:

C Connect to h.mx.mail.yahoo.com
S 220 mta1144.mail.mud.yahoo.com ESMTP YSmtp service ready
C HELO my-domain.com
S 250 mta1144.mail.mud.yahoo.com (152.70 ms)
C MAIL FROM: <existing-address@my-domain.com>
S 250 sender <existing-address@my-domain.com> ok (723.29 ms)
C RCPT TO: <sdjrfvn3r@yahoo.com>
S 250 recipient <sdjrfvn3r@yahoo.com> ok (152.67 ms)
C Close socket connection
S Connection closed gracefully

You can find the script which works properly here: http://verify-email.org

My script:

    while(preg_match('/^\d\d\d-/', $r = fgets($sock))) {
        $response .= $r;
    }
    $response .= $r;

    return $response;
}

$mxRecord = "a.mx.mail.yahoo.com";
$domain = 'example.com';
$mailFrom = 'mailfrom@example.com';
$rcptTo = 'doesntexist2011@yahoo.com';

$commands = array(
    "HELO ".$domain."\r\n",
    "MAIL FROM: <".$mailFrom.">\r\n",
    "RCPT TO: <".$rcptTo.">\r\n",
//  "DATA\r\n",
//  ... email subject and content
//  ".\r\n",
    "QUIT\r\n"
);

if($sock = fsockopen($mxRecord, 25, $errno, $errstr, 30)) {
    foreach($array as $cmd) {
        echo htmlentities($cmd);
        echo '<br />';
        fwrite($sock, $cmd);
        echo htmlentities(getResponse($sock));
        echo '<hr />';
    }

    fclose($sock);
}
else {
    echo 'no connection';
}
?>

Some information:

  • I used my own domain (not example.com)
  • The script is located on the server where my domain refers to
  • The server isn’t on any blacklist like spamhaus.org
  • The used mail address in “Mail From” does exist
  • I use getmxrr() to get the mx entries of yahoo.com
  • I tried HELO and EHLO -> always the same response
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:49:09+00:00Added an answer on May 27, 2026 at 6:49 pm

    Do NOT waste your money on verify-email.org. I had written a class that works quite well at verifying email addresses, but had been having problems for days trying to return anything from Yahoo other than a 250 Recipient OK message. I finally came up with a work around which I would share here by unfortunately after hitting their servers about 10 times or so they blocked me for 12 hours. I then moved the class from my dev server to a live server with a good domain name, rDNS configured and everything that would allow me to send emails without getting blacklisted minus domain keys. Again, I got nothing but 250 responses with SMTP and again I got my IP blocked with my work around. I finally decided to break down and buy the script to “see what they’re doing different”. The answer: They aren’t doing anything different. In fact, the script was garbage and almost identical to any rudimentary script you can find online. I loaded it on 2 different server and with two different configurations, followed the directions of the script to the letter ( it was only 1 or 2 instructions) and yet, got the same 250 response for the exact same email address that I received a 554 on the site. Digging a little deeper I found that it was potentially an email marketing company selling the script. They either have a relationship with Yahoo and others or its calling some other backend system, i dont know but I do know the sccript does not work. Furthermore, an emails sent to the seller and SWREG (a digital river company) have gone unanswered as well as a request for a refund. I sent screenshots of my results versus what they display on the site. I am now filing a dispute with my Credit Card company. Point being, DO NOT BUY from verify-email.org. Its a scam. That is unless you feel like pissing away $45.

    My only advice is to form business relationships with the majors or go through a company like ReturnPath (very very expensive.) Or, send confirmation emails to each subscriber. I unfortunately work for a marketing company that can’t send confirmation emails based on rules they have with their affiliate partners so I have to use a third party service (expensive) or come up with another solution. Good luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get this message when I try to send mail from php with my
I try to use PHPMailer to send registration, activation. etc mail to users: require(class.phpmailer.php);
I try to send a request to my server via GET, but qooxdoo sends
I am try to send mail from my app. I want to type(dynamically) recipient
The code below works perfectly to send text (.txt) attachments via the mail application
I get this error when I try to send an e-mail to a specific
I've written this code to try and send a url as a post value
I am getting this error when I try to send via the local server
I have a server which hosts mywebsite.com If I try to send mail to
I am sending a newsletter via PHP mail() in Spanish, they have accents and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.