I need to extract the email address out of this mailbox string. I thought of str_replace but the display name and the email address is not static so I don’t kno
str_replace
You can use imap_rfc822_parse_adrlist to parse that address:
$addresses = imap_rfc822_parse_adrlist('My name ');