Example #1
0
 public EmailConnector(string name, string emailAddress, string userName, string password, EmailServerConfig config, EmailConnectorType type, string description)
 {
     EmailConnectorId = Guid.NewGuid();
     Name             = name;
     EmailAddress     = emailAddress;
     UserName         = userName;
     Password         = password;
     Server           = config;
     Type             = type;
     Description      = description;
     Status           = EmailConnectorStatus.Stopped;
 }
 public IEmailConnector Build(EmailConnectorType emailConnectorType, List <Rule> rules, IRuleProcessorFactory ruleProcessorFactory, IUnitOfWork unitOfWork)
 {
     if (emailConnectorType.IsPop3())
     {
         return(new POP3EmailConnector(rules, ruleProcessorFactory, unitOfWork));
     }
     else if (emailConnectorType.IsIMAP())
     {
         return(new IMAPEmailConnector(rules, ruleProcessorFactory, unitOfWork));
     }
     else
     {
         return(new IMAPEmailConnector(rules, ruleProcessorFactory, unitOfWork));
     }
 }
 public static bool IsPop3(this EmailConnectorType type)
 {
     return(type == EmailConnectorType.POP3);
 }
 public static bool IsIMAP(this EmailConnectorType type)
 {
     return(type == EmailConnectorType.IMAP);
 }