I have a problem to send an email message to gmail account. Situation is the following, I m using IIS6 Default SMTP mail server to send emails. It sends emails to all mail clients, except gmail. Here is the code:
SmtpClient serv = new SmtpClient();
MailMessage msg = new MailMessage();
msg.To.Add("my gmail account address");
msg.From = new MailAddress("some email address");
msg.Body = "body";
msg.Subject = "subject";
msg.BodyEncoding = System.Text.Encoding.ASCII;
msg.IsBodyHtml = false;
serv.Host = "localhost";
serv.Send(msg);
Can you tell me what can be the problem? Thanks.