Sets Content-Type header of the email message.
Namespace: Jscape.EmailAssembly: Jscape.Email (in Jscape.Email.dll) Version: 2.4.5.0
Syntax
C# |
---|
public void SetContentType( string contentType, string characterSet ) |
Visual Basic |
---|
Public Sub SetContentType ( _ contentType As String, _ characterSet As String _ ) |
Visual C++ |
---|
public: void SetContentType( String^ contentType, String^ characterSet ) |
Parameters
- contentType
- Type: System..::..String
The content type of the email message.
- characterSet
- Type: System..::..String
The character set used for the content.
Remarks
The default content type and character set for a
newly created
CopyC# instance are text/plain
and us-ascii respectively.

EmailMessage
Examples
This example sets the ContentType and CharacterSet of a message.
CopyMime SetContentType
CopyMime SetContentType

byte[] data = GetMessageData(messageFile); EmailMessage message = new EmailMessage(data); message.SetContentType("text/html","us-ascii");

Dim data As Byte() = GetMessageData(messageFile) Dim message As EmailMessage = New EmailMessage(data) message.SetContentType("text/html","us-ascii")