/// <summary> /// Creates a config object based on previously saved settings /// </summary> /// <param name="configFile"></param> public SMTPConfig(string configFile) { _configFile = configFile; Stream s = File.Open(configFile, FileMode.Open); BinaryFormatter b = new BinaryFormatter(); SMTPConfig c = (SMTPConfig)b.Deserialize(s); _host = c.Host; _userName = c.UserName; _password = c.Password; _useSSL = c.UseSSL; _defaultFolderName = c.DefaultFolderName; _autoLogon = c.AutoLogon; _debugMode = c.DebugMode; _cacheFile = c.CacheFile; _autoGetMsgID = c.AutoGetMsgID; _autoSyncCache = c.AutoSyncCache; _logFile = c.LogFile; _debugDetail = c.DebugDetail; s.Close(); }
/// <summary> /// Alternate Constructor. Not all options are represented here. /// </summary> /// <param name="host">The name of the server to connect to</param> /// <param name="username">The username of the account</param> /// <param name="passowrd">The password to the account</param> /// <param name="ssl">Set to True to connect using SSL</param> /// <param name="autoLogon">Set to True to have the system automatically logged in</param> /// <param name="folder">The Root folder that should be used. Leave blank to include all folders.</param> public IMAPConfig(string host, string username, string passowrd, bool ssl, bool autoLogon, string folder) { this._host = host; this._userName = username; this._password = passowrd; this._useSSL = ssl; this._defaultFolderName = folder; this._autoLogon = autoLogon; this._debugMode = true; this._cacheFile = String.Empty; this._autoGetMsgID = true; this._autoSyncCache = false; this._logFile = String.Empty; this._debugDetail = DebugDetailLevel.All; }
/// <summary> /// Default Constructor /// </summary> public IMAPConfig() { this._host = String.Empty; this._userName = String.Empty; this._password = String.Empty; this._useSSL = false; this._autoLogon = false; this._defaultFolderName = String.Empty; this._debugMode = false; this._cacheFile = String.Empty; this._autoGetMsgID = false; this._autoSyncCache = false; this._logFile = String.Empty; this._debugDetail = DebugDetailLevel.All; }
/// <summary> /// Default Constructor /// </summary> public IMAPConfig() { this._host = String.Empty; this._userName = String.Empty; this._password = String.Empty; this._useSSL = false; this._autoLogon = false; this._defaultFolderName = String.Empty; this._debugMode = false; this._cacheFile = String.Empty; this._autoGetMsgID = false; this._autoSyncCache = false; this._logFile = String.Empty; this._debugDetail = DebugDetailLevel.All; }
/// <summary> /// Alternate Constructor. Not all options are represented here. /// </summary> /// <param name="host">The name of the server to connect to</param> /// <param name="username">The username of the account</param> /// <param name="passowrd">The password to the account</param> /// <param name="ssl">Set to True to connect using SSL</param> /// <param name="autoLogon">Set to True to have the system automatically logged in</param> /// <param name="folder">The Root folder that should be used. Leave blank to include all folders.</param> public SMTPConfig(string host, string username, string password, bool ssl, bool smtpAuth, bool autoLogon, string folder) { _host = host; _userName = username; _password = password; _useSSL = ssl; _defaultFolderName = folder; _autoLogon = autoLogon; _debugMode = true; _cacheFile = String.Empty; _autoGetMsgID = true; _autoSyncCache = false; _logFile = String.Empty; _debugDetail = DebugDetailLevel.All; _isSmtpAuthenticate = smtpAuth; //smtp }
/// <summary> /// Default Constructor /// </summary> public SMTPConfig() { _host = String.Empty; _userName = String.Empty; _password = String.Empty; _useSSL = false; _autoLogon = false; _defaultFolderName = String.Empty; _debugMode = false; _cacheFile = String.Empty; _autoGetMsgID = false; _autoSyncCache = false; _logFile = String.Empty; _debugDetail = DebugDetailLevel.All; _configFile = null; }
/// <summary> /// Creates a config object based on previously saved settings /// </summary> /// <param name="configFile"></param> public IMAPConfig(string configFile) { IMAPConfig c = new IMAPConfig(); Stream s = File.Open(configFile, FileMode.Open); BinaryFormatter b = new BinaryFormatter(); c = (IMAPConfig)b.Deserialize(s); this._host = c.Host; this._userName = c.UserName; this._password = c.Password; this._useSSL = c.UseSSL; this._defaultFolderName = c.DefaultFolderName; this._autoLogon = c.AutoLogon; this._debugMode = c.DebugMode; this._cacheFile = c.CacheFile; this._autoGetMsgID = c.AutoGetMsgID; this._autoSyncCache = c.AutoSyncCache; this._logFile = c.LogFile; this._debugDetail = c.DebugDetail; s.Close(); }
/// <summary> /// Creates a config object based on previously saved settings /// </summary> /// <param name="configFile"></param> public IMAPConfig(string configFile) { _configFile = configFile; Stream s = File.Open(configFile, FileMode.Open); BinaryFormatter b = new BinaryFormatter(); IMAPConfig c = (IMAPConfig)b.Deserialize(s); _host = c.Host; _userName = c.UserName; _password = c.Password; _useSSL = c.UseSSL; _defaultFolderName = c.DefaultFolderName; _autoLogon = c.AutoLogon; _debugMode = c.DebugMode; _cacheFile = c.CacheFile; _autoGetMsgID = c.AutoGetMsgID; _autoSyncCache = c.AutoSyncCache; _logFile = c.LogFile; _debugDetail = c.DebugDetail; s.Close(); }
/// <summary> /// Alternate Constructor. Not all options are represented here. /// </summary> /// <param name="host">The name of the server to connect to</param> /// <param name="username">The username of the account</param> /// <param name="passowrd">The password to the account</param> /// <param name="ssl">Set to True to connect using SSL</param> /// <param name="autoLogon">Set to True to have the system automatically logged in</param> /// <param name="folder">The Root folder that should be used. Leave blank to include all folders.</param> public IMAPConfig(string host, string username, string password, bool ssl, bool autoLogon, string folder) { _host = host; _userName = username; _password = password; _useSSL = ssl; _defaultFolderName = folder; _autoLogon = autoLogon; _debugMode = true; _cacheFile = String.Empty; _autoGetMsgID = true; _autoSyncCache = false; _logFile = String.Empty; _debugDetail = DebugDetailLevel.All; }