Showing posts with label Gmail. Show all posts
Showing posts with label Gmail. Show all posts

Monday, December 20, 2010

PHP: Gmail Class

I have created a class for Gmail using PHP.This class allows file attachments to be automatically downloaded into your server file directory.
Currently, I am still writing the functions for sending mail.

Do take note that in order for the server to be able to access gmail, imap-ssl must be configured for your PHP. You can check whether imap-ssl is installed by running a PHP which contains phpinfo(). Under the 3rd column, Configure Command, you should be able to see: ' --with-imap-ssl'
If you do not see that, please reconfigure your PHP installation to include that.

You can download the PHP files for the class here and the class tester here.
Alternatively, you can visit my website here.

Here are some snapshot of the output and the codes.

Output:

When there is a same file in the directory in which the file is to be downloaded into.
The 2nd one shows a file being downloaded.



Here are some snapshots of the code...

















This is the PHP to test the Gmail Class