Sending mail via http proxy

I am trying to send emails from a system that connects to the Internet through an http proxy that is installed in Internet Properties.

I am using SmtpClient.

Is there a way to send mail using SmtpClient through this proxy setting. Thanks

+5
source share
3 answers

I understand that you want to use the default browser settings, I would also like to answer this question.

Meanwhile, you can do it manually.

    MailAddress from = new MailAddress("from@mailserver.com");
    MailAddress to = new MailAddress("to@mailserver.com");

    MailMessage mm = new MailMessage(from, to);
    mm.Subject = "Subject"
    mm.Body = "Body";

    SmtpClient client = new SmtpClient("proxy.mailserver.com", 8080);
    client.Credentials = new System.Net.NetworkCredential("from@mailserver.com", "password");

    client.Send(mm);
+3
source

Http Proxies http-, - SMTP. - SMTP , SMTP "" SMTP-.

+5

HTTP, , , VPS ( equiv) SSH 443 ( ) ssh . smtp- ssh.

, , .

0

All Articles