private void BtnGuardarDatosEmail_Click(object sender, EventArgs e) { try { Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); config.AppSettings.Settings["eMailTo"].Value = this.txtDestinatario.Text; config.AppSettings.Settings["eMailFrom"].Value = this.txtRemitente.Text; config.AppSettings.Settings["eMailSMTP"].Value = this.txtSMTP.Text; config.AppSettings.Settings["eMailPass"].Value = this.txtContra.Text; config.AppSettings.Settings["portEmail"].Value = this.txtPuerto.Text; config.Save(ConfigurationSaveMode.Modified, true); ConfigurationManager.RefreshSection("appSettings"); if (this.chkPrueba.Checked) { Mensajes.MensajeOkForm("Se enviará un correo electrónico de prueba"); EnviarEmailErrores.SendEmailError("PRUEBA", "PRUEBA", "PRUEBA", "PRUEBA"); } } catch (Exception ex) { Mensajes.MensajeErrorForm(ex.Message); } }
private void BtnEnviar_Click(object sender, EventArgs e) { string rpta = EnviarEmailErrores.SendEmailError(this.Detalle_informacion, this.MetodoError, this.FormularioError, this.Informacion_corta); }