Hey All,
Trying to retrieve email address from bounced email in mysql table.
I have most of my bounced emails marking my contacts.email as invalid by
a removeme.id.tag in the sent email. But sometimes the mailer daemon just returns something like the following in the email body.
[QUOTE]
This is an automatically generated Dlevery Status Notification. Delivery To the following recipients failed. ‘
without the id.tag. So… how might I go about extracting the email address from the email body?
[code=php]while ($row = mysql_fetch_assoc($result))
{ //$row[‘description’] == email body text
$description = $row[‘description’];
$str = ‘This is an automatically generated Dlevery Status Notification. Delivery To the following recipients failed.’ ;
//$_split_email = preg_split (‘//’,’$str’, $description);
//$_split_email = array_shift(explode(‘$str’, $description));
$_split_email = array_pop(explode(‘$description’, $str,));
echo $_split_email;
}
Better Still… how might i just ignore all BUT the email string in the body, as the body text is bound to vary from one mailer_daemon to the next?