Overview

<< Click to Display Table of Contents >>

Navigation:  Reference > MailMessage >

Overview

 

MailMessage object represents e-mail message and contains all message data: sender, recipients, subject, body, attachments etc.

 

Syntax:

 

[Visual Basic]


Dim objMailMessage As New AddEmailLib.MailMessage

objMailMessage.MessageSubject = "test"

 

[VBScript]


Dim objMailMessage

Set objMailMessage = CreateObject("AddEmail.MailMessage")

objMailMessage.MessageSubject = "test"

 

[C#]


AddEmailLib.MailMessageClass objMailMessage = new AddEmailLib.MailMessageClass();

objMailMessage.MessageSubject = "test";

 

[C++]


AddEmailLib::IMailMessagePtr spMailMessage;

spMailMessage.CreateInstance(__uuidof(AddEmailLib::MailMessage));

spMailMessage->PutMessageSubject("test");

 

 

Properties:

 

Sender

Sender of e-mail message.

ReplyTo

Reply-to address.

MessageSubject

Subject of e-mail message.

MessageBody

Body of e-mail message.

MessageBodyFormat

Format of the body of e-mail message.

MessageBodyEncoding

Encoding of the body of e-mail message.

MessageBodyCharset

Character set of the body of e-mail message.

AltMessageBody

Alternative text-only body of e-mail message.

AltMessageBodyEncoding

Encoding of the alternative body of e-mail message.

AltMessageBodyCharset

Character set of the alternative body of e-mail message.

MessagePriority

Priority of e-mail message.

MessageId

Id of e-mail message.

MessageBodyFile

Filename of the file that contains body of e-mail message.

RequestReadReceipt

Request a read receipt for the message.

 

Methods:

 

AddRecipient

Adds recipient to the To field of e-mail message.

AddCcRecipient

Adds recipient to the Cc field of e-mail message.

AddBccRecipient

Adds recipient to the Bcc field of e-mail message.

AddAttachment

Adds attachment to e-mail message.

AddHeader

Adds header value to e-mail message.

ClearAttachments

Clears list of attachments.

ClearRecipients

Clears list of recipients in the To field of e-mail message.

ClearCcRecipients

Clears list of recipients in the Cc field of e-mail message.

ClearBccRecipients

Clears list of recipients in the Bcc field of e-mail message.

ImportHTML

Imports HTML file with embedded images.