/** * @inheritdoc */ protected function createConnectionForAccount(\Conjoon\Data\Entity\Mail\MailAccountEntity $mailAccount) { $connection = new $this->imapConnectionClassName(array('imapAdaptee' => new $this->imapAdapteeClassName())); $ssl = $mailAccount->getInboxConnectionType() == 'SSL' ? 'SSL' : ($mailAccount->getInboxConnectionType() == 'TLS' ? 'TLS' : false); $connection->connect(array('host' => $mailAccount->getServerInbox(), 'port' => $mailAccount->getPortInbox(), 'user' => $mailAccount->getUsernameInbox(), 'password' => $mailAccount->getPasswordInbox(), 'ssl' => $ssl)); return $connection; }