MessageBodyEncoding Property

<< Click to Display Table of Contents >>

Navigation:  Reference > MailMessage >

MessageBodyEncoding Property

 

MessageBodyEncoding property specifies encoding of main body of e-mail message.

 

Syntax

 

[Visual Basic]


objMailMessage.MessageBodyEncoding = MailEncoding7Bit

 

[VBScript]


objMailMessage.MessageBodyEncoding = 1 'MailEncoding7Bit

 

[C#]


objMailMessage.MessageBodyEncoding = AddEmailLib.MailEncoding.MailEncoding7Bit;

 

[C++]


HRESULT get_MessageBodyEncoding(MailEncoding*);

HRESULT put_MessageBodyEncoding(MailEncoding);

 

spMailMessage->PutMessageBodyEncoding(AddEmailLib::MailEncoding7Bit);

 

 

Remarks

 

MessageBodyEncoding property indicates which encoding method should be used for main body of the message. Possible encoding values are defined in the MailEncoding enumeration. Default value of MessageBodyEncoding property is MailEncodingDefault, which means that AddEmail will try to determine best encoding method based on the content of message body. Application can specify encoding method to save time needed to analyze message body. Use MailEncoding7Bit if message body contains only English ASCII characters 32-126 and line length does not exceed 76 characters. Use MailEncoding8Bit if message body contains non-English ASCII characters and line length does not exceed 76 characters. Use MailEncodingQuotedPrintable if line length exceeds 76 characters and formatting should be preserved. Use MailEncodingBase64 for Unicode messages or if message body contains many non-English ASCII characters. For HTML messages MailEncodingBase64 or MailEncodingQuotedPrintable is recommended.