News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sameer Borate:
Downloading Gmail attachments in PHP - an update
July 29, 2014 @ 09:37:40

Sameer Borate has posted an update to a previous post of his about downloading attachments in PHP. In this new post he updates the script to remove any other dependencies other than the IMAP PHP extension.

As mentioned in the earlier post, automatically extracting attachments from Gmail can be important for reasons where you need to process the attached files periodically with a CRON job or need to process the files programmatically. Also it can be useful for automatically archiving important attachments. [The code in this post] is a simple proof-of-concept plain PHP code, devoid of any object-oriented features that extracts attachments from your Gmail account.

The example code makes a request to the Gmail IMAP servers with the given username and password, grabs the first set of emails, parses their attachments to pull them down to the local host. He also includes some searching capability to locate ones only matching certain criteria. A list of the allowed search keywords is also included. He finishes the post with a look at using READONLY mode and fetching the email headers.

0 comments voice your opinion now!
attachment download gmail tutorial search

Link: http://www.codediesel.com/php/downloading-gmail-attachments-in-php-an-update/

blog comments powered by Disqus

Similar Posts

Lehi Sanchez's Blog: The Ultimate Open Source Web Server Installation Part 1

HowToForge.com: Installing Lighttpd With PHP5 And MySQL Support On OpenSUSE 11.1

Sameer Borate's Blog: Generating a color palette from a image in php

WebReferece.com: Managing Your Email Campaigns with phpList

Brandon Savage's Blog: Bug-Free: Your Bug-Fixing Toolkit (Part 1 of N)


Community Events





Don't see your event here?
Let us know!


package framework bugfix community voicesoftheelephpant library language interview introduction laravel api deployment list tips install release symfony series podcast opinion

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework