private void pn_mailS_Click(object sender, EventArgs e) { E_Email mail = new E_Email(); mail.MdiParent = this; mail.Show(); pn_mail.Hide(); }
protected void btnConfirmar_Click(object sender, EventArgs e) { ObjEE = (E_Email)Session["Mensaje"]; if (tbCodigo.Text == ObjEE.Msn) { ApagarComponentes(); pFase3.Visible = true; } }
private void E_email_Click(object sender, EventArgs e) { E_Email mail = new E_Email(); mail.MdiParent = this; mail.Show(); E_email.Enabled = false; }
public void EnviarCorreo(E_Email ObjEE) { try { mensaje.From = new MailAddress(ObjEE.From); mensaje.To.Add(new MailAddress(ObjEE.To)); mensaje.Body = ObjEE.Msn; mensaje.Subject = "Codigo Verificación"; smtp.Host = "smtp.gmail.com"; //Para enviar correos por gmail smtp.Port = 587; //Puerto que utiliza Gmail por defecto smtp.Credentials = new NetworkCredential(ObjEE.From, ObjEE.Password); smtp.EnableSsl = true; smtp.Send(mensaje); } catch (Exception e) { Console.WriteLine(e.StackTrace); } }