OMailMessage
Last updated
Last updated
LTools.Office.Model.OMailMessage is a mail message model. It is used in the elements that work with Outlook, Exchange, Lotus Notes mail clients.
ID
String
MailFormat
Message format. An example of its value is HTML
. It can also be PLAIN (plain text) or Rich Text
MessageType
LTools.Office.Model.OMailMessage.MailTypes
Only for Outlook. Examples: Message
or Report
(delivery report)
From
String
Email address of the sender, for example, user@mail.ru
To
List<String>
List of message recipients’ email addresses
Сс
List<String>
List of message copy recipients’ email addresses
Всс
List<String>
List of message Bcc (blind carbon copy) recipients’ email addresses
CreateDate
Date and time when the message was created, for example, 13.07.2023 18:21:25
. Does not exist in Lotus Notes
ReceiveDate
System.DateTime
Date and time when the message was received. Does not exist in Lotus Notes
Subject
String
Message subject
ConversationTopic
String
Body
String
Message body text. In Exchange, the body text will be read as HTML only, and in Outlook it can also be read as plain text (PLAIN). Plain text does not support images, hyperlinks (they will be displayed as plain links) and other similar elements. Example for PLAIN: "Text\n"
. When a conversation is displayed, the body will contain all emails in the conversation
HTMLBody
String
Message body text in HTML format
MessageProperties
LTools.Office.Model.OMailMessage.OMailProperties
Element
-
Represents an email message. Data type depends on the mail client used: for Exchange it is EmailMessage, for Outlook - MailItem, for Lotus - Domino.NotesDocument. To get access to class properties, it should first be manually cast as the necessary type. More details about it are provided in the subsection below.
Attachments
Email attachments
Note. All properties that begin with the word Send, as well as ReplyAll property, contain only technical information and are not intended for users. This applies to such properties as: SendTo, SendСс, SendВсс, SendOnBehalf, ReplyAll.
CreateDate/ReceiveDate model property has the following set of properties::
Example of obtaining the day of the month when the message was created: var_list_mails[0].CreateDate.Day
, where:
var_list_mails - nominal name of the variable;
[0] - index of the message whose property we want to obtain.
Element model property represents an email message. Data type depends on the email client:
for Lotus - it is Domino.NotesDocument.
The list of properties will correspond to the message class.
For example, to obtain the sender name for an Exchange message, it should first be cast as EmailMessage:
(var_list_mails[0].Element as Microsoft.Exchange.WebServices.Data.EmailMessage).Sender
.
MessageProperties model property (only Outlook) has the following set of properties:
It should be noted that the sender name may not be displayed - that depends on the mail server settings.
Message identifier. Provides a way to access a specific message by its ID. The IDs can be obtained by reading messages using appropriate Studio elements. For example, the result of using will be a list of messages, each of which has its own ID.
Only for Outlook. A conversation includes all messages in the same thread with the same subject line. Usually, the Conversation topic is the subject line of the first email in a thread. More information about conversations can be found . When a message is read in Outlook, it can have both the Subject and the ConversationTopic. An example for a sent message: Subject - "Re: Vacation"
, ConversationTopic - "Vacation"
Only for Outlook. Message properties are displayed if the element has Read properties flag. Message properties can be used, for example, to find out the display name of the sender or recipient
List<>
If the result is output via the element, make sure to cast the value as a string. Example result: 13
.
for Exchange - it is ;
for Outlook - it is ;
To obtain the value of any Element property, it has to be manually cast as the necessary class.
Their descriptions can be found in , by selecting in the left menu the name of the canonical property.
Example of obtaining the displayed : var_list_mails[0].MessageProperties.PR_SENDER_NAME
.