Menu

#70 Exception if body text ends with <CRLF>.<CRLF>

open
nobody
None
5
2005-08-10
2005-08-10
Neo
No

When there is a sequence of <CRLF>.<CRLF> in body text,
the following exception will occur:

Read from Stream threw an System.Exception:
System.IO.IOException: Unable to read data from the
transport connection. --->
System.Net.Sockets.SocketException: A connection
attempt failed because the connected party did not
properly respond after a period of time, or established
connection failed because connected host has failed to
respond
at System.Net.Sockets.Socket.Receive(Byte[] buffer,
Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[]
buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[]
buffer, Int32 offset, Int32 size)
at OpenSmtp.Mail.Smtp.ReadFromStream(NetworkStream& nw)

Since <CRLF>.<CRLF> is special to SMTP protocol (it is
the end string for DATA command), there must be a way
to 'escape' this special string in body text.

Discussion


Log in to post a comment.