ASP.net SMTP邮件虽然代理邮件、ASP、net、SMTP

2023-09-03 01:49:58 作者:新年〃老衲还俗

如何设置 SMTPClient 在ASP.net中使用C#与提供的代理服务器地址发送电子邮件?或发送通过检测系统默认代理

我用下面的code。在的web.config ,但没有工作

 < system.net>
    < defaultProxy启用=真正的>
      <代理bypassonlocal =FALSEproxyaddress =htt​​p://192.168.101.3:8080//>
    < / defaultProxy>
  < /system.net>
 

解决方案

您无法通过HTTP代理服务器发送SMTP电子邮件。

讲的人管理你的互联网网关/防火墙问他们要你直接出站电子邮件到什么主机。

易语言发送smtp邮件收不到

How to setup SMTPClient in ASP.net with C# to send email with provided proxy address ? or sending by detecting the system default proxy

I used the the following code in web.config but didnt work

<system.net>
    <defaultProxy enabled="true">
      <proxy bypassonlocal="False" proxyaddress="http://192.168.101.3:8080/" />
    </defaultProxy>
  </system.net>

解决方案

You can't send SMTP email through an HTTP proxy server.

Speak to the person administering your Internet gateway/firewall to ask what host they want you to direct outbound email to.