I am currently struggling, trying to integrate an Email Imap plugin, which I need for the application I am building, but somehow I cannot get cake to load the datasource inside the file.
My file structure is currently as follows
Plugin\emails\models\datasources\imap_source.php
My database Config :
public $emailTicket = array(
'datasource' => 'emails.imap',
'server' => 'imap.gmail.com',
'connect' => 'imap/tls/novalidate-cert',
'username' => 'myemail@domain.com',
'password' => '**********',
'port' => '143', //incoming port
'ssl' => true,
'encoding' => 'UTF-8',
'error_handler' => 'php',
'auto_mark_as' => array(
'Seen',
// 'Answered',
// 'Flagged',
// 'Deleted',
// 'Draft',
),
);
What other values I tried for the datasource key :
- 'Emails.ImapSource' (I read that datasource should be camelcase) but this gives Missing plugin error since the plugin folder name start with lower case.
- 'emails.models.datasources.imap_source'
- 'emails.imap_source'
- 'emails.imapSource'
- 'emails.ImapSource'
Also In case you were wandering, yes I am loading plugin from bootstrap
tried CakePlugin::load('emails');
and CakePlugin::load('Emails');
I am sure this is some naming convention which im missing. Any ideas ? Thanks in advance
PLEASE HELP, I'M DESPERATE here