Пример #1
0
 private void SendIntromail(string Agentname, string Username)
 {
     try
     {
         clsMailFormats format = new clsMailFormats();
         MailMessage msg = new MailMessage();
         msg.From = new MailAddress("*****@*****.**");
         msg.To.Add(Username);
         msg.Subject = "Thank You For Your Interest In United Rv Exchange";
         msg.IsBodyHtml = true;
         string text = string.Empty;
         text = format.SendRVIntromaildetails(Agentname, ref text);
         msg.Body = text.ToString();
         SmtpClient smtp = new SmtpClient();
         //smtp.Host = "smtp.gmail.com";
         //smtp.Port = 587;
         //smtp.Credentials = new System.Net.NetworkCredential("*****@*****.**", "hugomirad");
         //smtp.EnableSsl = true;
         //smtp.Send(msg);
         smtp.Host = "127.0.0.1";
         smtp.Port = 25;
         smtp.Send(msg);
         bool bnew = objSmartzIntroBL.RvsSaveIntroMailDetails(Agentname, Username);
     }
     catch (Exception ex)
     {
         //throw ex;
         Response.Redirect("EmailServerError.aspx");
     }
 }