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

  • Home
  • SEARCH
  • 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 3443194
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:45:41+00:00 2026-05-18T08:45:41+00:00

This PHP function working just fine: if (preg_match (/<(\S+@\S+\w)>.*\n?.*55[0-9]/i,$body,$match)) { echo found!; } in

  • 0

This PHP function working just fine:

if (preg_match ("/<(\S+@\S+\w)>.*\n?.*55[0-9]/i",$body,$match)) {
echo "found!";
}

in

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

xxx@hotmail.com
SMTP error from remote mail server after RCPT TO:<xxx@hotmail.com>:
host mx3.hotmail.com [65.54.188.72]: 550 Requested action not taken:
mailbox unavailable

But if I use the same php function in this case:

A message that you sent could not be delivered to one or more of its 
recipients. This is a permanent error. The following address(es) failed:

xxx@yahoo.com
SMTP error from remote mail server after end of data:
host d.mx.mail.yahoo.com [209.191.88.254]: 554 delivery error:
dd This user doesn't have a yahoo.com account (xxxd@yahoo.com) [0] -  mta1010.mail.mud.yahoo.com

The preg_match function does not give any results. What am I doing wrong?

  • 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-18T08:45:42+00:00Added an answer on May 18, 2026 at 8:45 am

    You are basically looking for a email addressing enclosed in < and >.

    Your first input has it but the second input does not: It has no email id in < > hence you don’t get a match.

    Edit: (after your comment):

    Looking at the 2 samples given by you the email id appears between the string failed: and the error code starting with 55. You can make use of the preg_match for this as:

    if(preg_match('/failed:.*?(\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b).*55[\d]/is',$str,$m)) {
           echo "Bounced email ".$m[1]."\n";
    }
    

    Ideone link

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

Sidebar

Related Questions

I'm getting this problem: PHP Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable
This example is from php.net: <?php function Test() { static $a = 0; echo
I have this little function function makewindows(){ child1 = window.open (about:blank); child1.document.write(<?php echo htmlspecialchars(json_encode($row2['ARTICLE_DESC']),
I got this jQuery code which is working just fine. Except on element I
i have this jquery voting script, everything is working fine, it just that the
I have a JavaScript function, pop_item . I have to call this from PHP,
This question is simple. What function would I use in a PHP script to
So what I'm looking for here is something like PHP's print_r function. This is
i need help with disk_total_space function.. i have this on my code <?php $sql=select
This PHP code... 207 if (getenv(HTTP_X_FORWARDED_FOR)) { 208 $ip = getenv('HTTP_X_FORWARD_FOR'); 209 $host =

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.