How to send mail in asp.net through proxy server
i am trying to send mail through asp.net using the code mentioned below.
it works fine without proxy environment. but now i am working with proxy servers and use proxy settings to connect to internet.
it gives error 'Failure Sending Mail'
Please anyone help ?

    MailMessage msg = new MailMessage("xyz@gmail.com", TextBox1.Text);
    msg.Subject = TextBox2.Text;
    msg.Body = TextBox3.Text;
    SmtpClient s = new SmtpClient();
    s.Host = "smtp.gmail.com";
    s.Credentials = new NetworkCredential("xyz@gmail.com", "password");
    s.Send(msg);
How to send mail in asp.net through proxy server
===

i am trying to send mail through asp.net using the code mentioned below.
it works fine without proxy environment. but now i am working with proxy servers and use proxy settings to connect to internet.
it gives error 'Failure Sending Mail'
Please anyone help ?

    MailMessage msg = new MailMessage("xyz@gmail.com", TextBox1.Text);
    msg.Subject = TextBox2.Text;
    msg.Body = TextBox3.Text;
    SmtpClient s = new SmtpClient();
    s.Host = "smtp.gmail.com";
    s.Credentials = new NetworkCredential("xyz@gmail.com", "password");
    s.Send(msg);