Search code examples
phpparsingemailgmailimap

Parsing Current Gmail Email


Hey guys, basically what Im having problems currently is finding a way to parse a current email that someone is reading through gmail once they click a button that will be provided through an extension on the side of the email. I want to just extract the subject and the contact name of the email I'm reading on screen and store into some variables in php.

Possible solutions I had in mind was to use the imap functions that come with php to figure out what email I was reading currently, but Im not sure how to go about doing this. Another solution that came to mind was HTML scraping, but not sure how complicated it could be by doing this. Maybe there is an easier way, and hopefully someone can help me out?

Edit

I think Im going to do a different solution to this problem will post when I figured it out.


Solution

  • I decided to use Gmail Contextual Gadgets which can extract information from the email and be used to make any application.