SmtpClient works in windowsxp but fails in windows7
I am setting attributes for S开发者_Python百科mtpClient in program. It works fine in windowsxp but in windows7, it does not work every time. Some time it works and some time fails with failure message. Is there any known issue with SmtpClient in windows 7?
There is one issue with SmtpClient that bit me once:
http://connect.microsoft.com/VisualStudio/feedback/details/146711/smtpclient-does-not-gracefully-close-the-underlying-tcp-ip-connection
After an email has been sent using the SmtpClient, the connection is not gracefully closed. The SmtpClient sends the content, then the . and then terminates the connection. No QUIT command is issued.
The expected behavior is to send a QUIT command before terminating the connection.
The SmtpClient should have a Dispose() methods which would gracefully terminate the connection.
It's been a known issue since 2006.
精彩评论