Get email address from mailbox string

前端 未结 5 1732
梦如初夏
梦如初夏 2021-01-12 10:53

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

5条回答
  •  臣服心动
    2021-01-12 11:51

    You can use imap_rfc822_parse_adrlist to parse that address:

    $addresses = imap_rfc822_parse_adrlist('My name ');
    

提交回复
热议问题