$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
ホスト名が重要な理由:
(電車に乗って、画像が不安定でごめんなさい)