ContentType Property

<< Click to Display Table of Contents >>

Navigation:  Reference > MailAttachment >

ContentType Property

 

ContentType property specifies content type of the attachment.

 

Syntax

 

[Visual Basic]


objMailAttachment.ContentType = "application/pdf"

 

[VBScript]


objMailAttachment.ContentType = "application/pdf"

 

[C#]


objMailAttachment.ContentType = "application/pdf";

 

[C++]


HRESULT get_ContentType(BSTR*);

HRESULT put_ContentType(BSTR);

 

spMailAttachment->PutContentType("application/pdf");

 

 

Remarks

 

Default value of ContentType property is an empty string. If ContentType is an empty string, AddEmail tries to read content type from the registry based on file extension of the attachment.