php - How to read ip address of the incoming emails -
i have set continuous project class available online students , parents can interact with. inquire students email project progress everyday. utilize imap info , display online.
i understand email addresses can spoofed. how can find out if mail service did come yahoo, gmail or hotmail. imap function use. tried this
imap_headerinfo($inbox, $emails[$x])
but not give me ip address of servers passed through.
i appreciate help.
$mailinfo = imap_headerinfo($inbox, $emails[$x]); print_r($mailinfo->from);
should give you: personal, adl, mailbox, , host
any of next should help $mailinfo->...: (for total reference, check http://php.net/manual/en/function.imap-headerinfo.php)
->to - array of objects to: line, next properties: personal, adl, mailbox, , host
->from - array of objects from: line, next properties: personal, adl, mailbox, , host
->ccaddress - total cc: line, 1024 characters
->cc - array of objects cc: line, next properties: personal, adl, mailbox, , host
->bccaddress - total bcc: line, 1024 characters
->bcc - array of objects bcc: line, next properties: personal, adl, mailbox, , host
->reply_toaddress - total reply-to: line, 1024 characters
->reply_to - array of objects reply-to: line, next properties: personal, adl, mailbox, , host
->senderaddress - total sender: line, 1024 characters
->sender - array of objects sender: line, next properties: personal, adl, mailbox, , host
->return_pathaddress - total return-path: line, 1024 characters
->return_path - array of objects return-path: line, next properties: personal, adl, mailbox, , host
why hostname important:
(sorry shaky image, sitting on train)
php cakephp imap
No comments:
Post a Comment