cuongnd
asked on
how can i send an email to an exchange email in asp.net?
I have a feedback page. But i can not program to send a reply mail to an exchange email. Any one help me?
SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();
try
{
MailAddress fromAddress = new MailAddress("acb@email.com");
smtpClient.Host = "localhost";
smtpClient.Port = 25;
message.From = fromAddress;
Email send to
message.To.Add("def@def.com");//this is an exchange account
message.Subject = txtTitle.Text;
message.IsBodyHtml = false;
message.Body = txtDescription.Text;
smtpClient.Send(message);
}
catch (Exception ex)
{
}
do you get an exception? if so what are the details?
ASKER
No, I didn't get any exception. Thanks a lot.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi, DaTribe
I think this error may be because the criteria of mail server. Thank you so much
I think this error may be because the criteria of mail server. Thank you so much