public Form_WriteMail(IMailReceiver receiver) { InitializeComponent(); m_receiver = receiver; }
public void Logon(InternetMailProfile profile, InternetMailProtocol receiveMailProtocol = InternetMailProtocol.Pop3) { _profile = profile; if (!string.IsNullOrEmpty(_profile.SmtpServerAddress) && !_profile.Pop3BeforeSmtp) { LogonSmtp(); } switch (receiveMailProtocol) { case InternetMailProtocol.Imap: receiver = new ImapReceiver(); if (!string.IsNullOrEmpty(_profile.ImapServerAddress)) { receiver.Logon(_profile); } break; case InternetMailProtocol.Pop3: receiver = new Pop3Receiver(); if (!string.IsNullOrEmpty(_profile.Pop3ServerAddress)) { receiver.Logon(_profile); } break; case InternetMailProtocol.Smtp: throw new RuntimeException("Недопустимо указывать SMTP в качестве протокола получения почты!"); } if (!string.IsNullOrEmpty(_profile.SmtpServerAddress) && _profile.Pop3BeforeSmtp) { LogonSmtp(); } }
public UserTestService(NaheulbookHttpClient naheulbookHttpClient, IMailReceiver mailReceiver, DbContextOptions <NaheulbookDbContext> dbContextOptions) { _naheulbookHttpClient = naheulbookHttpClient; _mailReceiver = mailReceiver; _dbContextOptions = dbContextOptions; }
public MailSteps(ScenarioContext scenarioContext, IMailReceiver mailReceiver) { _scenarioContext = scenarioContext; _mailReceiver = mailReceiver; }