Send an email C# error

OK here is my problem I copy a code that it was canceled as a question that is: http://answers.unity3d.com/questions/18952/system-net-mail-smtpclient-send-closed but my problem wasn't all that kind of things that he put like an error, actually its clear of does errors but I get an error that says

Assets/mail.cs(3,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?

So maybe this is not the correct form to put it, but I try clearing that part but I get more errors about MessageBox.

Also and very important, I got another 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 the error is founded in Client.Send(Email);

So, Please answer, I need an answer of what is rong in this line of Client.Send(Email);.

Thanks... in advance.

usually this is because the DNS query returned two IP addresses (an ipv4 and an ipv6), the ipv6 was first in the list, and ipv6 is not enabled somewhere. You can solve it by manually resolving the host, and selecting the ipv4 address.

IPHostEntry hostInfo = Dns.GetHostByName(hostString);
foreach(IPAddress ip in hostInfo.AddressList)
{
  if (ip.AddressFamily == ProtocolFamily.InterNetwork)
  {
    // this is the ipv4
  }
}

Your question isn't entirely clear, but I think you may be trying to use Microsoft.NET namespaces. Monodevelop is an alternative IDE for multi-platform .net development and as such, you may have to use alternative namespaces in some instances. I suggest looking at the Monodevelop documentation to broaden your understanding: http://monodevelop.com/Documentation