-
Notifications
You must be signed in to change notification settings - Fork 4
Cakephp Imap datasource that allows querying the Imap mailbox of a configured account.
dalpo/cakephp_imap_datasource
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Cakephp Imap datasource that allows querying the Imap mailboxes of configured account Based on gwoo and mooose work: http://bin.cakephp.org/view/154300048 Datasource is under development but it basically works.. database.php configuration: ================================================= class DATABASE_CONFIG { public $default = array( //your default db connection... ); //imap email connection public $emailConnection = array( 'datasource' => 'imap', 'host' => 'imap.example.net', 'connect' => 'imap/notls', 'login' => 'email@example.net', 'password' => 'pwd', 'mailbox' => 'INBOX', 'port' => '143' ); public $test = array( 'driver' => 'mysql', 'persistent' => false, 'host' => 'localhost', 'login' => 'user', 'password' => 'password', 'database' => 'test_database_name', 'prefix' => '' ); } model configuration: ================================================= class CompanyEmail extends AppModel { public $name = 'CompanyEmail'; public $useDbConfig = 'emailConnection'; public $useTable = false; public $displayField = "subject"; //Model::exists() must return true function exists($reset = false) { return true; } } finally in your controller you can retrive email: ================================================= $emails = $this->CompanyEmail->find('all', array( 'order' => array('message_date' => 'DESC') ) );
About
Cakephp Imap datasource that allows querying the Imap mailbox of a configured account.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published