Introduction

Exclamation character getting inserted in body of mail messages sent programmatically using CDO object.

char1.jpg



Cause:
This is happening because RFC 2822 places limits on the number of characters in a line. According to section 2.1.1 of RFC 2822 (document attached), lines in a message MUST be a maximum of 998 characters excluding the CRLF. If the number of characters in a line exceeds the limit, exclamation mark followed by CRLF character gets inserted automatically in the message body.

Solution: While forming body text, if we append line feed character after every nth (n < 998) character or so, then this problem will get resolved. ‘Char(10)’ can be used in SQL 2000 stored procedures as a line feed character.
推荐.NET配套的通用数据层ORM框架:CYQ.Data 通用数据层框架
新浪微博粉丝精灵,刷粉丝、刷评论、刷转发、企业商家微博营销必备工具"