/// <summary> /// Sending Emails to Users /// </summary> /// <param name="Email"></param> /// <param name="Password"></param> public void SendEmail(object sender, UserRegistrationDoneEventArgs eventArgs) { try { MailMessage mailMessage = new MailMessage() { Subject = "Hello", Body = "hii your details", IsBodyHtml = false }; mailMessage.To.Add(new MailAddress(eventArgs.Email)); using (var smtp = new SmtpClient()) { smtp.Send(mailMessage); // return RedirectToAction("Sent"); } } catch (Exception ex) { // Response.Write(ex.Message); } //MailMessage msg = new MailMessage(); //// Sender e-mail address. //msg.From = new MailAddress("*****@*****.**"); //// Recipient e-mail address. //msg.To.Add(eventArgs.Email); //msg.Subject = "Login Credentials"; ////string url = "http://*****:*****@gmail.com", "Naveen@123"); //smtp.EnableSsl = true; //smtp.Send(msg); }
/// <summary> /// Sending SMS to USERS /// </summary> /// <param name="Email"></param> /// <param name="Password"></param> public void SendSMS(object sender, UserRegistrationDoneEventArgs eventArgs) { }