Ok so I am doing a code in C# to send to a persons email a message, here is the code:
MailAddress EmailFrom = new MailAddress("panchosalazardeurquidi5@gmail.com");
MailAddress EmailTo = new MailAddress(txtTo);
MailMessage Email = new MailMessage(EmailFrom, EmailTo);
Email.Subject = txtTitle;
Email.Body = txtContext;
SmtpClient Client = new SmtpClient("www.gmail.com/");
Client.Send(Email);
My principal problem is that I get an error that says:
SocketException: No such host is known System.Net.Dns.GetHostByName (System.String hostName) System.Net.Sockets.TcpClient.Connect (System.String hostname, Int32 port) System.Net.Sockets.TcpClient..ctor (System.String hostname, Int32 port)
And says that the problem is on
Client.Send(Email);
So, could please some one help me with this.