0

I was wondering how one would go about writing a php script to access mail from yahoo or gmail ?

Dylan Corriveau
  • 2,561
  • 4
  • 29
  • 36
coder
  • 61
  • 1
  • 6

3 Answers3

4

The "simplest" way would be to use IMAP to access the mails (i.e. don't try any kind of HTML scraping !). I have no idea for Yahoo, but I know you can enable IMAP in gmail.

There are several libraries in PHP that allow one to use the IMAP protocol to access a mailbox ; for instance :

  • There are functions provided in PHP (You might have to install the extension, though) : IMAP, POP3 and NNTP
  • Or you could use something like Zend_Mail.
Pascal MARTIN
  • 395,085
  • 80
  • 655
  • 663
0

You could use the Zend Framework Zend_Mail functionality, this would allow you to connect to GMail/Yahoo/etc with POP3 or IMAP.

Nalum
  • 4,143
  • 5
  • 38
  • 55
0

One more to add to Pascal's suggestions: libgmailer

ghoppe
  • 21,452
  • 3
  • 30
  • 21