Hi
you might want to use this:
MailMessage Email = new MailMessage();
Console.WriteLine("Sender:");
MailAddress Sender = new MailAddress(Console.ReadLine());
Email.From = Sender;
Console.WriteLine("To:");
Email.To.Add(Console.ReadLine());
Console.WriteLine("Subject:");
Email.Subject = Console.ReadLine();
Console.WriteLine("Text:");
Email.Body = Console.ReadLine();
Console.WriteLine("SMTP server:");
string ServerName = Console.ReadLine();
Console.WriteLine("Port:");
string Port = Console.ReadLine();
SmtpClient MailClient = new SmtpClient(ServerName, int.Parse(Port));
Console.WriteLine("Username:");
string UserName = Console.ReadLine();
Console.WriteLine("Password:");
string Password = Console.ReadLine();
System.Net.NetworkCredential Credentials = new System.Net.NetworkCredential(UserName, Password);
MailClient.Credentials = Credentials;
MailClient.Send(Email);
cheers,
Marco Alessandro Bertschi