Example #1
0
 public function testImapPortGetterAndSetter()
 {
     $origin = new UserEmailOrigin();
     $this->assertEquals(null, $origin->getImapPort());
     $origin->setImapPort(123);
     $this->assertEquals(123, $origin->getImapPort());
 }
 /**
  * Creates a processor is used to synchronize emails
  *
  * @param UserEmailOrigin $origin
  * @return ImapEmailSynchronizationProcessor
  */
 protected function createSynchronizationProcessor($origin)
 {
     $config = new ImapConfig($origin->getImapHost(), $origin->getImapPort(), $origin->getImapEncryption(), $origin->getUser(), $this->encryptor->decryptData($origin->getPassword()), $this->imapEmailGoogleOauth2Manager->getAccessTokenWithCheckingExpiration($origin));
     return $this->syncProcessorFactory->create(new ImapEmailManager($this->connectorFactory->createImapConnector($config)), $this->getKnownEmailAddressChecker());
 }
 /**
  * @param UserEmailOrigin $origin
  *
  * @return ImapEmailFolderManager
  */
 protected function createManager(UserEmailOrigin $origin)
 {
     $config = new ImapConfig($origin->getImapHost(), $origin->getImapPort(), $origin->getImapEncryption(), $origin->getUser(), $this->mcrypt->decryptData($origin->getPassword()), $this->imapEmailGoogleOauth2Manager->getAccessTokenWithCheckingExpiration($origin));
     $connector = $this->connectorFactory->createImapConnector($config);
     return new ImapEmailFolderManager($connector, $this->doctrine->getManager(), $origin);
 }
 /**
  * @param UserEmailOrigin $origin
  *
  * @return ImapEmailFolderManager
  */
 protected function createManager(UserEmailOrigin $origin)
 {
     $config = new ImapConfig($origin->getImapHost(), $origin->getImapPort(), $origin->getImapEncryption(), $origin->getUser(), $this->mcrypt->decryptData($origin->getPassword()));
     $connector = $this->connectorFactory->createImapConnector($config);
     return new ImapEmailFolderManager($connector, $this->doctrine->getManager(), $origin);
 }