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 page 1200) and Big-endian (code page 1201) byte orders are supported.
UTF7 UCS Transformation Format (UTF), 7-bit form. Can also be accessed as code page 65000.
UTF8 UCS Transformation Format (UTF), 8-bit form. Can also be accessed as code page 65001.

To apply the encoding to the e-mail message body, the following syntax can be used:

mailObj.BodyEncoding = Encoding.ASCII 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.181.165