Created
October 13, 2011 16:40
-
-
Save emjayess/1284740 to your computer and use it in GitHub Desktop.
programmatic access to gmail/google apps mailbox using zend framework php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// IMAP access must first be enabled on the account you want to check | |
function mail_googleapps() | |
{ | |
try { | |
return new Zend_Mail_Storage_Imap( | |
array( | |
'ssl' => 'SSL', | |
'host' => 'imap.gmail.com', | |
'port' => '993', | |
'user' => '[email protected]', // or '[email protected]' | |
'password' => '########' | |
) | |
); | |
} | |
catch (Zend_Mail_Exception $ex) { | |
die($ex->getMessage() . " /me /die"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment