关于[10054] Connection reset by peer 错误

今天一直跑得好好滴 邮件群发程式 出错了

出错信息:10054 Connection reset by peer

 查Google 发现网上有这样解释滴:

①:服务器的并发连接数超过了其承载量,服务器会将其中一些连接Down掉;
②:客户关掉了浏览器,而服务器还在给客户端发送数据;
③:浏览器端按了Stop


[10054] Connection reset by peer

Connection reset by peer is a tough one because it can be caused by so many things. In all cases, the server determines that the socket is no longer good and closes it from its side.

Read Error
Scenario: Mary couldn't make out what Joe was saying anymore, so she hung up rather than lose his messages (data).
A read error occurs when a server cannot successfully read from a user's client. Servers gather information from the client by text, setup, and other items.When the server receives an error when reading from a client, it then disconnects the user, resulting in a read error quit message.

Write Error
Scenario: Mary was trying to talk to Joe but didn't think she was getting through, so she hung rather than lose his messages (data).
A write error occurs when a server cannot successfully write to a user's client. When the server receives information, it usually responds with information of its own. When the server receives an error when writing to a client, it then disconnects the user, resulting in a write error quit message similar to the read error format.

Ping Timeout Error
Scenario: Mary, having been raised in a household with too many kids and always craving attention, keeps asking to make sure that Joe is still on the line and listening. If he doesn't reply fast enough to suit her, she hangs up.
Servers automatically ping users at a preset time. The reason for this is to ensure the client is still connected to the server. When you see "PING? PONG!" results in your status window, it means the server has pinged your client, and it has responded back with a pong to ensure the server that you are still connected. When this does not happen and you disconnect without the server's knowledge, the server will automatically disconnect the user when it does not receive a response, resulting in a ping timeout. Ping timeouts occur to EVERYONE.

Broken pipe Error
Scenario: Mary had picked up a sticky note with a message she needed to relay to Joe, but somehow between her hand and her mouth, the message got misplaced. Mary was trying to talk to Joe but didn't think she was getting through, so she hung up rather than lose his messages (data).
A broken pipe error occurs when the server knows it has a message but can't seem to use its internal data link to get the data out to the socket.

Miscellaneous
Scenario: Lots of other reasons; perhaps the operator broke in and gave Mary a message that made her doubt the validity of the call so she hung up.

于是乎,检查代码,
一一加入异常处理,关闭SMTP连接,即用即开连接。

错误依旧!!! !!!

根据截获滴用户EMAIL地址

发现其EMAIL地址 不规范

前有空格 @前也有空格

在SQL中 Trim掉空格, 再次发送 成功!

据猜测 可能是邮件中转服务器发现地址不合乎要求所以拒绝发送并断开了连接

不管怎么说 由于邮件地址中出现空格 让邮件(中转)服务器拒绝服务 却是第一次遇到 谨记备忘。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值