Gets the content type of the message.
A string containing the content type of the mail message. The default value for a new message is text/plain.
The value of this property is taken from the Content-Type header. The typical content types are:
You do not need to manually set the content-type of the message. It will be set automatically depending on the structure of the message (e.g. its text bodies and attachments).
This sample downloads the first message from the specified POP3 account and displays the content type of the message.
[C#] using System; using MailBee; using MailBee.Pop3Mail; using MailBee.Mime; class Sample { static void Main(string[] args) { // Quickly download the first message from the specified POP3 account MailMessage msg = Pop3.QuickDownloadMessage("pop3.mail.com", "dan_brown", "password", 1); // Show the content type of the message. Console.WriteLine("Content type is " + msg.ContentType); } }
[Visual Basic] Imports System Imports MailBee Imports MailBee.Pop3Mail Imports MailBee.Mime Module Sample Sub Main(ByVal args As String()) ' Quickly download the first message from the specified POP3 account Dim msg As MailMessage = Pop3.QuickDownloadMessage("pop3.mail.com", "dan_brown", "password", 1) ' Show the content type of the message. Console.WriteLine("Content type is " & msg.ContentType) End Sub End Module
MailMessage Class | MailBee.Mime Namespace