使用 php Imap 获取 Ccc 表单邮件
Fetch Ccc form mails with php Imap
我一直在尝试通过 php imap
从收到的电子邮件中获取协作者
imap_fetch_overview($stream, $email_id, 0);
$from = $this->decode_imap_text($overview[0]->from);
$subject = $this->decode_imap_text($overview[0]->subject);
$to = $this->decode_imap_text($overview[0]->to);
function decode_imap_text($str) {
$result = '';
$decode_header = imap_mime_header_decode($str);
foreach ($decode_header AS $obj) {
$result .= htmlspecialchars(rtrim($obj->text, "\t"));
}
return $result;
}
但找不到如何获取 CCC 或合作者
使用 imap_fetch_overview
你无法获得 CC 地址,你需要 imap_fetchheader
or imap_headerinfo
。
我一直在尝试通过 php imap
从收到的电子邮件中获取协作者imap_fetch_overview($stream, $email_id, 0);
$from = $this->decode_imap_text($overview[0]->from);
$subject = $this->decode_imap_text($overview[0]->subject);
$to = $this->decode_imap_text($overview[0]->to);
function decode_imap_text($str) {
$result = '';
$decode_header = imap_mime_header_decode($str);
foreach ($decode_header AS $obj) {
$result .= htmlspecialchars(rtrim($obj->text, "\t"));
}
return $result;
}
但找不到如何获取 CCC 或合作者
使用 imap_fetch_overview
你无法获得 CC 地址,你需要 imap_fetchheader
or imap_headerinfo
。