php imap从电子邮件地址 [英] php imap get from email address

查看:125
本文介绍了php imap从电子邮件地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用imap_open从电子邮件中检索电子邮件地址?

How do I retrieve the email address from an email with imap_open?

如果发件人姓名已知,如果我使用的话,我会收到发件人姓名而不是电子邮件地址'from'参数。

If the sender name is known I get the sender name instead of the email address if I use the 'from' parameter.

代码: http:// gist.github.com/514207

推荐答案

$header = imap_headerinfo($imap_conn, $msgnum);
$fromaddr = $header->from[0]->mailbox . "@" . $header->from[0]->host;

这篇关于php imap从电子邮件地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆