Kavitha M

Kavitha M

  • NA
  • 21
  • 6.5k

Send Mail from Exchange Server

Jul 15 2015 8:51 AM
Hi,
 
I want to send mail from exchange server. I want to send mail without password. I use the following code snippet :
 
MailMessage msg = new MailMessage();
msg.From = new MailAddress("[email protected]");
msg.To.Add(new MailAddress("[email protected]"));
msg.Subject = "Reg : Timesheet";
msg.IsBodyHtml = true;
msg.Body = "<html><body>" + strMsg + "</body></html>";
SmtpClient client = new SmtpClient("IP address of server", 25);
client.Host = "IP address of server";
client.Send(msg);
 
But unable to send mail..  Is there any other settings to be done for exchange server ?
 
 
 

Answers (1)