1

I want to look for mails in my Google mail account that match a certain search term. The plan is to give it a search term and search any mails subject, sender and body. I know how to browse through all the mail and I am sure I can get the data I want and match that with my search term using some regex, but is there a better way?

Maybe there is an API or something better I could use? I am doing this with PHP.

Juicy Scripter
  • 25,778
  • 6
  • 72
  • 93
user1638055
  • 482
  • 2
  • 8
  • 24
  • You may look into [Programatically searching GMail?](http://stackoverflow.com/questions/3242619/programatically-searching-gmail) for some directions – Juicy Scripter Sep 06 '12 at 16:24

1 Answers1

0

Every Gmail account can be accessed via IMAP and there is an IMAP PHP extension. However, Google provides IMAP extensions with additional functionality. The documentation can be found here.

Florian Eckerstorfer
  • 1,526
  • 1
  • 14
  • 21