在smtp发送邮件失败请帮助我 [英] Failure sending mail in smtp please help me

查看:151
本文介绍了在smtp发送邮件失败请帮助我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

System.Net.WebException:无法解析远程名称:System.Net.ServicePoint.GetConnection上的'smtp.google.com'(PooledStream PooledStream,对象所有者,布尔异步,IP地址和地址,Socket&abortSocket,Socket&abortSocket6 )在System.Net.ConnectPool.GetConnection(Object owningObject,GeneralAsyncDelegate asyncCallback,Int32)的System.Net.PooledStream.Activate(Object owningObject,GeneralAsyncDelegate asyncCallback)上的System.Net.PooledStream.Activate(Object owningObject,Boolean async,GeneralAsyncDelegate asyncCallback)处。 SystemTime.Net.Mail.SmtpClient上的System.Net.Mail.SmtpClient.GetConnection()处的System.Net.Mail.SmtpTransport.GetConnection(ServicePoint servicePoint)上的System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)处的creationTimeout) .Send(MailMessage message)

System.Net.WebException: The remote name could not be resolved: 'smtp.google.com' at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6) at System.Net.PooledStream.Activate(Object owningObject, Boolean async, GeneralAsyncDelegate asyncCallback) at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback) at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) at System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint) at System.Net.Mail.SmtpTransport.GetConnection(ServicePoint servicePoint) at System.Net.Mail.SmtpClient.GetConnection() at System.Net.Mail.SmtpClient.Send(MailMessage message)

推荐答案

参考我之前的回答发从asp.net发送电子邮件到gmail [ ^ ]。



您将获得完整的工作代码。
Refer my previous answer sending email to gmail from asp.net[^].

You will get the full working code.


这篇关于在smtp发送邮件失败请帮助我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆