reading forwarded mails from gmail using imap_fetch_overview

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
indianyogi
Forum Newbie
Posts: 7
Joined: Tue Jan 20, 2009 9:16 am

reading forwarded mails from gmail using imap_fetch_overview

Post by indianyogi »

I am forwarding my emails from my gmail account to a mailbox using gmail's forwarding facility [Using Setting->Forward option]

Now, from that mailbox i am fetching overview using imap_fetch_overview . I am not at all interested in what the body of email(s) contains.

Now, the real issue is that if someone emails me (to my gmail address) and appends the "To:" section with more then one email address (along with mine).

On "overview->to" (in imap_fetch_overview) i get this result:
myname<myemail@gmail.com>, name2<name2@heremailaddress.com>

HOW can i programmatically "know" the source email address [in this case myemail@gmail.com] from forwarded emails.
indianyogi
Forum Newbie
Posts: 7
Joined: Tue Jan 20, 2009 9:16 am

Re: reading forwarded mails from gmail using imap_fetch_overview

Post by indianyogi »

i got it !!

using msg headers.

Thanks a lot !!!!!
Post Reply