public SMTPmodel SMTPdataIMAP() { SMTPmodel data = null; if (this.dbOpen() == true) { cmd = new MySqlCommand("SELECT * FROM ConnectionSMTP WHERE type = 'imap'", conn); sdr = cmd.ExecuteReader(); while (sdr.Read()) { bool ssl = true; if (Convert.ToInt32(sdr["ssl"]) == 0) { ssl = false; } data = new SMTPmodel { mailserver = sdr["mailserver"].ToString(), port = Convert.ToInt32(sdr["port"]), ssl = ssl, login = sdr["login"].ToString(), password = "******" }; } sdr.Close(); } return(data); }
public EmailImap() { SMTPdata = mySql.SMTPdataIMAP(); mySql.dbClose(); }