Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Smtp 集成SendGrid_Smtp_Sendgrid - Fatal编程技术网

Smtp 集成SendGrid

Smtp 集成SendGrid,smtp,sendgrid,Smtp,Sendgrid,我正在尝试将SendGrid集成到MVC应用程序中。 它正在使用端口587。并且启用了SSL Host = "smtp.sendgrid.net"; 当我尝试发送电子邮件时,它会抛出: System.Net.Sockets.SocketException:无法建立连接,因为目标计算机主动拒绝连接159.122.224.196:587 Message : Failure sending mail. 另外,当我ping smtp.sendgrid.net时,它正在使用IP 159.122.2

我正在尝试将SendGrid集成到MVC应用程序中。 它正在使用端口587。并且启用了SSL

Host = "smtp.sendgrid.net";
当我尝试发送电子邮件时,它会抛出: System.Net.Sockets.SocketException:无法建立连接,因为目标计算机主动拒绝连接159.122.224.196:587

 Message : Failure sending mail. 

另外,当我ping smtp.sendgrid.net时,它正在使用IP 159.122.224.197

您的计算机上是否运行防火墙/防病毒应用程序来阻止端口587上的传出请求?如果是这样,请添加一条规则以允许在端口587上发出请求。

每个SendGrid入站地理位置都有2个IP,因此
.196
vs
.197
可以。如果你运行一个程序,它能工作吗?