[英]CakePHP- Imap_Source Plugin - Missing Datasource
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. 我目前正在努力,尝试集成我正在构建的应用程序所需的Email Imap插件,但是以某种方式我无法获得蛋糕来将数据源加载到文件中。
My file structure is currently as follows 我的文件结构当前如下
Plugin\emails\models\datasources\imap_source.php
My database Config : 我的数据库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.ImapSource'(我读到数据源应该为驼峰格式),但是这会导致Missing plugin错误,因为插件文件夹名称以小写字母开头。
- 'emails.models.datasources.imap_source'
'emails.models.datasources.imap_source'
- 'emails.imap_source'
'emails.imap_source'
- 'emails.imapSource'
'emails.imapSource'
- 'emails.ImapSource'
'emails.ImapSource'
Also In case you were wandering, yes I am loading plugin from bootstrap tried CakePlugin::load('emails');
另外,如果您在徘徊,是的,我正在从Bootstrap加载插件,尝试过
CakePlugin::load('emails');
and CakePlugin::load('Emails');
和
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 请帮助,我在这里绝望
I dont think you downloaded the correct version of that plugin. 我认为您没有下载该插件的正确版本。
You should download this one: 您应该下载此文件:
https://github.com/nicolasramy/cakephp-emails-plugin/tree/cake-2.0 https://github.com/nicolasramy/cakephp-emails-plugin/tree/cake-2.0
And with that, you can place it directly into your app/Model/Datasource/ImapSource.php
. 这样一来,您可以将其直接放入
app/Model/Datasource/ImapSource.php
。 You don't need to create a plugin for it. 您无需为其创建插件。
It should work if you do it this way, unless you are using CakePHP 1.3, which I dont think you are since you said you are building an application. 如果您以这种方式进行操作,它将正常工作,除非您使用的是CakePHP 1.3,但我不认为这是因为您说过您正在构建应用程序。
Thanks, 谢谢,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.