Setting E-Mail Encodings for the E-Mail Body and Attachments

E-mail encoding is used to pass information from the sender to the recipient using a desired format. Typically ASCII encoding is used for all e-mails, but in case an alternative format is needed, the BodyEncoding property is available to change the encoding type. The Encoding object contains four enumerations of encoding. Different encoding schemes might be necessary for both older legacy systems, and when Unicode support for international characters is needed. Table 15.3 describes each of these.

Table 15.3. E-Mail Encoding Types
Encoding Type Description
ASCII Encodes characters as single 7-bit ASCII characters.
Unicode Encodes characters as two consecutive bytes. Little-endian (code ...

Get Special Edition Using® Microsoft® ASP.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.