i have thousand of email in my gmail account.In the email i have a many files in each email but i need to download a file with csv extension and copy it to folder in my PC. Any idea how would i do this in PHP ??
Asked
Active
Viewed 806 times
0
-
1Connect via IMAP (or POP3, whatever), get all emails and then get the csv files... just a guess – Ben Everard Jun 08 '12 at 09:47
1 Answers
2
You may find this useful, for the basics of connecting to gmail from PHP/IMAP.
And here is more detailed info about getting attachments via IMAP.
You can easily filter the attachments by filename to get only .CSV files, using preg_match() or even strpos().

Alexander Gilmanov
- 387
- 2
- 9