Example #1
0
 public SmtpClient(CodeConfigurationProvider configurationProvider, string smtpUser, string smtpPassword)
 {
     if (configurationProvider == null)
     {
         throw new ArgumentNullException("configurationProvider");
     }
     if (smtpUser == null)
     {
         throw new ArgumentNullException("smtpUser");
     }
     if (smtpPassword == null)
     {
         throw new ArgumentNullException("smtpPassword");
     }
     this._configurationProvider = configurationProvider;
     this._connectionFactory     = new ConnectionFactory();
     this._username = smtpUser;
     this._password = smtpPassword;
 }
Example #2
0
 protected void Init(string host, ushort port, string smtpUser, string smtpPassword, EInteractionType interactionType, EAuthenticationType authenticationType)
 {
     if (host == null)
     {
         throw new ArgumentNullException("host");
     }
     if (smtpUser == null)
     {
         throw new ArgumentNullException("smtpUser");
     }
     if (smtpPassword == null)
     {
         throw new ArgumentNullException("smtpPassword");
     }
     this._configurationProvider = new CodeConfigurationProvider(host, port, interactionType, authenticationType);
     this._connectionFactory     = new ConnectionFactory();
     this.Username  = smtpUser;
     this.Password  = smtpPassword;
     this.ProxyUser = "";
     this.State     = ESmtpClientState.Awaiting;
 }