I use the following code for SMTP:
MailMessage mail = new MailMessage();
mail.From = new System.Net.Mail.MailAddress(Global.username);
mail.Subject = Global.subject;
SmtpClient smtp = new SmtpClient();
smtp.Port = 587;
smtp.EnableSsl = true;
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.UseDefaultCredentials = false;
smtp.Credentials = new NetworkCredential(Global.username, Global.password);
smtp.Host = "smtp.gmail.com";
mail.To.Add(new MailAddress(Global.to));
mail.IsBodyHtml = true;
mail.Subject = Global.subject;
mail.Body = Global.message;
smtp.Send(mail);
That works perfectly, but the problem is I need HTTP and Socks proxy support. I'm looking for ether free libraries that I can use for commercial purposes or what approach should I do to get proxies running. I also need this for POP3 and IMAP, I'm thinking it will be easier to write my own wrappers than finding something already out there, I'm just not sure where to start. I have got my own HTTP wrapper done with HTTP and Socks support, but I'm not sure how SMTP, IMAP and POP3 works through proxy.. Whats the best way for me to get this done? Thanks!