Gmail でメールを送信したいのですが、次の例外が発生します
到達不能なネットワークに対してソケット操作が試行されました [2a00:1450:400c:c05::6d]:465
それを解決する方法はありますか?
MailMessage msg = new MailMessage();
msg.From = new MailAddress("test@yahoo.com");
msg.To.Add("test@yahoo.com");
msg.Subject = this.txtSubject.Text;
msg.Body = this.txtBody.Text;
SmtpClient client = new SmtpClient("smtp.gmail.com");
client.Port = 465;
client.EnableSsl = true;
client.Send(msg);