Possible Duplicate:
Sending email in .NET through Gmail
hello,
Im using code like below but I get an error:
"Unable to connect to the remote server"
 MailMessage mail = new MailMessage();
        mail.To.Add("test1@gmail.com");
        mail.From = new MailAddress("test2@gmail.com");
        mail.Subject = "Test Email";
        string Body = "<b>Welcome to CodeDigest.Com!!</b>";
        mail.Body = Body;
        mail.IsBodyHtml = true;
        SmtpClient smtp = new SmtpClient();
        smtp.Host = "smtp.gmail.com";
        smtp.Port = 587;
        smtp.Credentials = new System.Net.NetworkCredential("test1@gmail.com", "myPass");
        smtp.EnableSsl = true;
        smtp.Send(mail);
 
     
    