I am currently doing a project, but I am still working on the local machine. The problem is that I can't seem to connect the gmail mailbox using this plugin
The real problem is, that I do not know the code for connecting with gmail account on localhost using the plugin. I have this in my config :
public $emailTicket = array(
'datasource' => 'ImapSource',
'server' => 'localhost',
'connect' => 'imap/tls/novalidate-cert',
'username' => '************@gmail.com',
'password' => '*********',
'port' => '143', //incoming port
'ssl' => false,
'encoding' => 'UTF-8',
'error_handler' => 'php',
'auto_mark_as' => array(
'Seen',
// 'Answered',
// 'Flagged',
// 'Deleted',
// 'Draft',
),
);
Then cake returns an error : Error: Unable to get imap_thread after 4 retries. 'Can't connect to **localhostName**,143: Refused
Anyone knows the correct way to do it? Or if its possible that I continue working on this on the localmachine, if so, how?
[EDIT]
Within the plugin code, this is how it prepares the parameters for php's imap_open() :
case 'imap':
$this->_connectionString = sprintf(
'{%s:%s%s%s}',
$this->config['server'],
$this->config['port'],
@$this->config['ssl'] ? '/ssl' : '',
@$this->config['connect'] ? '/' . @$this->config['connect'] : ''
);
break;
$retries = 0;
while (($retries++) < $this->config['retry'] && !$this->thread) {
$this->Stream = imap_open($this->_connectionString, $this->config['username'], $this->config['password']);
$this->thread = @imap_thread($this->Stream);
}