Primo RPA Global
  • Primo RPA
  • Primo Studio
    • Useful links
    • System requirements
    • Editions
    • Installation and updates
      • Robot Core manual installation and execution
      • Updates
    • Launching and getting started
      • Getting started
    • Studio settings
      • Extensions and plugins install
        • Chrome
        • FireFox
        • Opera (Deprecated)
        • Edge
        • Yandex
        • RDP
        • Java
      • Automated installation of extensions for browsers
      • Updating Selenium WebDriver
      • NuGet
      • Fine-tuning
        • Multi-session work
    • Working with projects
      • Analyzing projects
      • Creating libraries
      • Dependencies
      • Namespaces
    • Working with processes
      • Sandbox
    • Working with sequences
    • Working with workflows
    • Working with Code
    • Working with elements
    • Process execution and debugging
      • Testing
    • Script recording
    • Log
    • Variables and arguments
    • Search
    • Search patterns
    • Release control
    • Traffic record
    • UI inspector
    • SAP Inspector
    • Mobile devices
    • Panel management
    • Robot
      • Robot editions
    • RDP
    • Tools
      • Import
      • OCR pattern editor
      • Dialog designer
  • Elements
    • Base elements
      • 1C
        • 1C (local)
        • 1C (server)
        • Execute query
      • Assistant
        • Show hint
      • Browser
        • Open browser
        • Attach browser
        • Activate browser
        • Text input
        • Element vanish
        • Close browser
        • Mouse click
        • Navigate
        • Get attribute
        • Get list
        • Get text
        • Element exists
        • Read table
        • Get image
        • Select item
        • Set focus
        • Anchor
        • Execute JS
        • Back
      • Clipboard
        • Get from clipboard
        • Copy to clipboard
      • Collections
        • Add to array
        • Table to CSV
        • Table filter
      • Cryptography
        • Set Credentials
        • Get Credentials
        • Delete Credentials
      • Data
        • Date/time
          • Current date/time
          • Date diff
          • Date part
          • Date to string
          • Modify date
          • String to date
        • Archiving
          • Create archive
          • Extract archive
        • HTML
          • HTML to object
        • JSON
          • JSON to object
          • Object to JSON
        • Mapping
          • Create mapping
          • Update mapping
        • Strings
          • Cast to string
          • Get substring
          • Regular expression
          • Replace substring
          • Split string
          • String length
          • Substring exists
          • Trim string
        • XML
          • XML to object
          • XPath query
          • Object to XML
        • Data tables
          • Add column
          • Add row
          • Clean table
          • Create table
          • Merge tables
          • Remove column
          • Remove row
          • Sort table
      • Database
        • Connect
        • Execute query
      • Desktop
        • Activate window
        • Anchor
        • Attach application
        • Close application
        • Create desktop video
        • Drag and drop
        • Element exists
        • Element vanish
        • Get list
        • Get processes
        • Get text
        • Hot-key simulation
        • Kill application
        • Maximize window
        • Minimize window
        • Mouse click
        • Read table
        • Restore window
        • Select item
        • Set focus
        • Start application
        • Take screenshot
        • Text input
        • Type simulate
      • Dialogs
        • Add to log
        • Comment
        • Message box
        • Input dialog
        • Beep
        • Custom input
      • E-mail
        • Data types
          • OMailMessage
          • MailFormats
          • OMailAttachment
          • MailMessage
          • MailAttachments
          • OContact
        • Lotus Notes
          • Attach Lotus Notes
          • Save attachment
          • Delete mail
          • Move mail
          • Read mail
          • Send message
        • MS Exchange
          • MS Exchange Server
          • Delete messages
          • Mark messages
          • Move to folder
          • Read mail
          • Save attachment
          • Save mail
          • Send mail
        • Move to folder (IMAP)
        • Receive mail (IMAP)
        • Receive mail POP3
        • Send message (SMTP)
      • File system
        • Append line
        • Write file
        • Copy file
        • Move file
        • File search
        • Create directory
        • Create file
        • File/folder exists
        • Delete file/folder
        • Read file
      • Flow control
        • If-Else
        • Switch
        • Try-Catch
        • Exit sequence
        • Break
        • Comment out
        • Throw
        • Wait
        • Parallel threads
        • Sequence
        • Assign
        • Continue
        • Process link
        • Do-While
        • ForEach
        • While
      • Google Sheets
        • Google Sheets document
        • Write range
        • Read range
      • Message queues
        • ActiveMQ
          • Send message
          • ActiveMQ
        • Kafka
          • Send message
          • Read messages
      • MS Excel
        • Run macro
        • Excel workbook
        • Cell input
        • Select range
        • Append range
        • Calculate formulas
        • Sort range
        • Get sheets
        • Save workbook
        • Delete range
        • Filter range
        • Read range
      • MS Outlook
        • Outlook
        • Close Outlook
        • Send message
        • Read address book
        • Read mail
      • MS Word
        • Add table row
        • Copy to clipboard
        • Delete text
        • Export document
        • Find text
        • Get text
        • Insert image
        • Insert table
        • Read table
        • Replace text
        • Save document
        • Select range
        • Text input
        • Word document
        • Write table cell
      • Network
        • FTP
          • Send to FTP
          • Download FTP file
          • List FTP files
        • Terminal server
          • Connect
          • Execute script
          • Disconnect
        • Web request
      • OCR
        • ABBYY FlexiCapture
          • FlexiCapture server
          • Process documents
        • Dbrain
          • Classify documents
          • Dbrain server
          • Process documents
        • Microsoft OCR
        • Tesseract OCR
        • Yandex Vision OCR
        • Image Vanish
        • Image click
        • Text click
        • Image exists
        • Text recognition
        • Validate document
      • Orchestrator
        • Assets
          • Get Asset
          • Get Credentials
          • Set Asset
          • Set Credentials
        • Process
        • Queues
          • Peek queue
          • Add to queue
      • PDF
        • Add watermark
        • Page count
        • Merge documents
        • Get image
        • Get text
      • Programming
        • C# Script
        • Invoke method
        • JavaScript
        • Python Script
        • Command prompt
        • Power Shell
      • SAP Front end
        • BAPI
          • BAPI connection
          • BAPI function
        • Attach SAP
        • Calendar
        • Check box
        • Combo box
        • Control exists
        • Get text
        • Mouse click
        • Open SAP
        • Radio button
        • Set focus
        • Tab strip
        • Table
        • Text input
        • Tree
      • Smart devices
        • Attach device
        • Press hot-key
        • Type text
        • Start application
        • Tap control
        • Get text
      • Testing
        • Get next local test data
        • Mock
        • Verify expression
        • Verify expression with operator
        • Verify output with operator
      • Workflow
        • Decision
        • Sequence
        • State
        • Workflow
  • Orchestrator
    • Monitoring
    • Automation
      • Tasks
    • Administration
      • Workers
      • Robots
      • Projects
      • Templates
      • Assets
      • Queues
    • Setting
      • Distribute
      • Journal
      • Users
      • Roles
      • Licenses
    • User settings
Powered by GitBook
On this page
  • Model properties
  • Details
  • CreateDate
  • Element
  • MessageProperties
  1. Elements
  2. Base elements
  3. E-mail
  4. Data types

OMailMessage

PreviousData typesNextMailFormats

Last updated 11 months ago

LTools.Office.Model.OMailMessage is a mail message model. It is used in the elements that work with Outlook, Exchange, Lotus Notes mail clients.

Model properties

Property
Type
Description

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.

Details

CreateDate

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

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

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.

🔹
‼️
Add log
Microsoft.Exchange.WebServices.Data.EmailMessage
Microsoft.Office.Interop.Outlook.MailItem
this section
sender name
Read mail
LTools.Office.Model.OMailMessage.MailFormats
System.DateTime
here
Read mail
LTools.Office.Model.OMailAttachment