我已经为我的班级设置了一个连续的项目,可以在网上获得,供学生和家长互动。所以我要求学生每天给他们的项目进度发电子邮件。我使用imap获取信息并在网上显示。
我知道电子邮件地址可能会被欺骗。我怎样才能找到邮件是否真的来自雅虎,gmail或hotmail。我可以使用哪种imap功能。我试过这个
imap_headerinfo($inbox,$emails$x)
但是它并没有给我它通过的服务器的ip地址。
我很感谢你的帮助。
发布于 2013-02-06 04:02:30
$mailinfo = imap_headerinfo($inbox, $emails[$x]);
print_r($mailinfo->from);
应该给你:personal, adl, mailbox, and host
以下任何一项都会帮助您$mailinfo->...
(要获得完整的参考,请查看http://php.net/manual/en/function.imap-headerinfo.php)
->to - an array of objects from the To: line, with the following properties: personal, adl, mailbox, and host
->from - an array of objects from the From: line, with the following properties: personal, adl, mailbox, and host
->ccaddress - full cc: line, up to 1024 characters
->cc - an array of objects from the Cc: line, with the following properties: personal, adl, mailbox, and host
->bccaddress - full bcc: line, up to 1024 characters
->bcc - an array of objects from the Bcc: line, with the following properties: personal, adl, mailbox, and host
->reply_toaddress - full Reply-To: line, up to 1024 characters
->reply_to - an array of objects from the Reply-To: line, with the following properties: personal, adl, mailbox, and host
->senderaddress - full sender: line, up to 1024 characters
->sender - an array of objects from the Sender: line, with the following properties: personal, adl, mailbox, and host
->return_pathaddress - full Return-Path: line, up to 1024 characters
->return_path - an array of objects from the Return-Path: line, with the following properties: personal, adl, mailbox, and host
为什么主机名是重要的:
(不好意思,坐在火车上的形象不稳定)
https://stackoverflow.com/questions/14728131
复制相似问题