Moti Mashiah
asked on
C Sharp
Hi guys ,
I have some issue to send email after I implemented this code
the issue is in my credential
smtp.Credentials = new System.Net.NetworkCredenti al("exampl e@domain.c om", "password");
actually in my case exchange server I have to type credential in this way below:
smtp.Credentials = new System.Net.NetworkCredenti al("domain \example", "password");
when I type this way I get some error - unrecogniz escape sequence.
I need to know how can I type my user like domain\example without getting this error.
I have some issue to send email after I implemented this code
MailMessage mail = new MailMessage();
mail.To.Add("dataprocessing@althompson.com");
mail.From = new MailAddress("systeminfo@althompson.com");
mail.Subject = em.Subject;
string Body = em.Body;
mail.Body = Body;
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "172.16.1.6";
smtp.Port = 587;
smtp.UseDefaultCredentials = false;
smtp.Credentials = new System.Net.NetworkCredential("example@domain.com", "password");
smtp.EnableSsl = true;
smtp.Send(mail);
return View();
the issue is in my credential
smtp.Credentials = new System.Net.NetworkCredenti
actually in my case exchange server I have to type credential in this way below:
smtp.Credentials = new System.Net.NetworkCredenti
when I type this way I get some error - unrecogniz escape sequence.
I need to know how can I type my user like domain\example without getting this error.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER