Sets Content-Type header of the email message.

Namespace: Jscape.Email
Assembly: 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#
EmailMessage
instance are text/plain and us-ascii respectively.

Examples

This example sets the ContentType and CharacterSet of a message.
CopyMime SetContentType
byte[] data = GetMessageData(messageFile);
EmailMessage message = new EmailMessage(data);
message.SetContentType("text/html","us-ascii");

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

See Also