Skip to content

Instantly share code, notes, and snippets.

@emjayess
Created October 13, 2011 16:40
Show Gist options
  • Save emjayess/1284740 to your computer and use it in GitHub Desktop.
Save emjayess/1284740 to your computer and use it in GitHub Desktop.
programmatic access to gmail/google apps mailbox using zend framework php
// 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