public C_verificar(Vo_gmail vo_gmail = null) { frm = new Capa_Vista.frm_code(); c_message = C_message.getInstancia(); message_box = c_message.formulario(); e_gmail = vo_gmail; }
public C_modificar(Vo_gmail vo_gmail) { frm = new Capa_Vista.frm_modify(); c_message = C_message.getInstancia(); message_box = c_message.formulario(); c_logeo = new C_logeo(); e_gmail = vo_gmail; }
private void btnAceptar_Click(object sender, EventArgs e) { if (frm.txt_gmail.Text != "TELÉFONO O CORREO ELECTRÓNICO") { if (frm.ckbNoSoyRobot.Checked == true) { if (frm.txt_valor.Text == frm.lblReCaptcha.Text) { e_recuperar.Valor = frm.txt_gmail.Text; e_gmail = pxy_recuperar.SEARCH(e_recuperar); if (e_gmail != null) { pxy_gmail.INITIALIZE_SMTP_CLIENT(); if (pxy_gmail.SEND_MAIL(e_gmail)) { overlayForm.Dispose(); frm.Hide(); overlayForm.Dispose(); c_verificar = new C_verificar(e_gmail); c_verificar.InitializeEvents(); } else { desenfoque_abrir_formulario(); c_message.message("Código no enviado al correo electrónico ", C_message.message_type.error); overlayForm.Dispose(); } } else { desenfoque_abrir_formulario(); c_message.message("No hay ninguna cuenta con dichos datos ", C_message.message_type.error); overlayForm.Dispose(); } } else { desenfoque_abrir_formulario(); c_message.message("Resolver el Captcha ", C_message.message_type.error); overlayForm.Dispose(); } } else { desenfoque_abrir_formulario(); c_message.message("Seleccionar el Captcha ", C_message.message_type.error); overlayForm.Dispose(); } } else { desenfoque_abrir_formulario(); c_message.message("Ingrese el dato correspondiente", C_message.message_type.error); overlayForm.Dispose(); } }
private void notificar() { e_verificar.Clave = C_logeo.clave[0]; e_gmail = pxy_verificar.E_MAIL(e_verificar); if (e_gmail != null) { pxy_gmail.INITIALIZE_SMTP_CLIENT(); pxy_gmail.SEND_MAIL(e_gmail); } }
public bool SEND_MAIL(Vo_gmail gmail) { if (m_gmail == null) { m_gmail = new M_gmail(); return(m_gmail.SEND_MAIL(gmail)); } else { return(m_gmail.SEND_MAIL(gmail)); } }
public bool SEND_MAIL(Vo_gmail gmail) { var mailMessage = new MailMessage(); try { mailMessage.From = new MailAddress(senderMail); foreach (string mail in gmail.RecipientMail) { mailMessage.To.Add(mail); } mailMessage.Subject = gmail.Subject; mailMessage.Body = gmail.Body; mailMessage.Priority = MailPriority.Normal; smtpClient.Send(mailMessage);//Enviar mensaje return(true); } catch (Exception ex) { return(false); } finally { mailMessage.Dispose(); smtpClient.Dispose(); } }