activities
latest
false
UiPath logo, featuring letters U and I in white
Productivity Activities
Last updated Nov 15, 2024

GetOutlookMailOptions

Options used to retrieve Outlook email messages.

Namespace: UiPath.Mail.Activities.Api

Assembly: UiPath.Mail.Activities.Api (in UiPath.Mail.Activities.Api.dll)

Inheritance: System.Object > GetMailOptions > GetOutlookMailOptions.

Properties

PropertyTypeDescription
AccountstringThe account used to access the messages to retrieve.
FilterstringA string used as a filter for the messages to be retrieved. Accepts JET Queries or DASL Queries.
FilterByMessageIdsList<string>Returns only mail messages that match the specified message IDs.
You can retrieve the message ID from the MailMessage object, for example, MailMessage.Headers("Message-ID").
If set, the Filter option is ignored.
GetAttachementsbookSpecifies whether to retrieve the attachments in the email messages.
MailFolderstringThe mail folder from which to retrieve messages.
MarkAsReadboolSpecifies whether to mark retrieved messages as read.
OnlyUnreadMessagesboolSpecifies whether to retrieve only unread messages.
OrderByDateEOrderByDateOrders mail messages by date.
Topint32The number of messages to be retrieved starting from the top of the list.

GetOutlookMailOptions Methods

These are the methods you can use to configure mail options.

WithAccount

Sets the Account property.

Namespace: UiPath.Mail.Activities.Api

Assembly: UiPath.Mail.Activities.Api (in UiPath.Mail.Activities.Api.dll)

WithAccount(string)

public GetOutlookMailOptions WithAccount(
	string account
)public GetOutlookMailOptions WithAccount(
	string account
)
account String
The account used to send the message.

Return value

GetOutlookMailOptions

Returns an updated instance of GetOutlookMailOptions.

WithFilterExpression

Set a filter for the returned mail messages.

Namespace: UiPath.Mail.Activities.Api

Assembly: UiPath.Mail.Activities.Api (in UiPath.Mail.Activities.Api.dll)

WithFilter(string)

public GetOutlookMailOptions WithFilter(
	string filter
)public GetOutlookMailOptions WithFilter(
	string filter
)
filter String
The string used as a filter for the messages to be retrieved. Accepts JET Queries or DASL Queries.

Return Value

GetOutlookMailOptions
Returns an updated instance of GetOutlookMailOptions.

WithFolder

Set the mail folder from which to retrieve the messages.

Namespace: UiPath.Mail.Activities.Api

Assembly: UiPath.Mail.Activities.Api (in UiPath.Mail.Activities.Api.dll)

WithFolder(string)

public GetOutlookMailOptions WithFolder(
	string folder
)public GetOutlookMailOptions WithFolder(
	string folder
)
folder String
The mail folder from which to retrieve the messages.

Return Value

GetOutlookMailOptions
Returns an updated instance of GetOutlookMailOptions.

WithGetAttachements

Sets the GetAttachements property.

Namespace: UiPath.Mail.Activities.Api

Assembly: UiPath.Mail.Activities.Api (in UiPath.Mail.Activities.Api.dll)

WithGetAttachements(bool)

public GetOutlookMailOptions WithGetAttachements(
	bool getAttachements
)public GetOutlookMailOptions WithGetAttachements(
	bool getAttachements
)
getAttachements Boolean
Whether to retrieve the attachments in the email messages.

Return value

GetOutlookMailOptions

Returns an updated instance of GetOutlookMailOptions.

WithMarkAsRead

Specify whether to mark retrieved messages as read.

Namespace: UiPath.Mail.Activities.Api

Assembly: UiPath.Mail.Activities.Api (in UiPath.Mail.Activities.Api.dll)

WithMarkAsRead(bool)

public GetOutlookMailOptions WithMarkAsRead(
	bool markAsRead
)public GetOutlookMailOptions WithMarkAsRead(
	bool markAsRead
)
markAsRead Boolean

Whether to mark retrieved messages as read.

Return Value

GetOutlookMailOptions
Returns an updated instance of GetOutlookMailOptions.

WithMessageIdsFilter

Sets the FilterByMessageIds property.

Namespace: UiPath.Mail.Activities.Api

Assembly: UiPath.Mail.Activities.Api (in UiPath.Mail.Activities.Api.dll)

WithMessageIdds(IEnumerable<string>)

public GetOutlookMailOptions WithMessageIdsFilter(
	IEnumerable<string> ids
)public GetOutlookMailOptions WithMessageIdsFilter(
	IEnumerable<string> ids
)
ids IEnumerable<String>
Returns only mail messages that match the specified message IDs. If this is specified, the Filter operation is ignored.
You can retrieve the message ID from the MailMessage object. For example, use the following statement: MailMessage.Headers("Message-ID").

Return value

GetOutlookMailOptions

An updated instance of GetOutlookMailOptions, used to retrieve Outlook mail messages.

WithOnlyUnreadMessages

Specify whether to retrieve only unread messages.

Namespace: UiPath.Mail.Activities.Api

Assembly: UiPath.Mail.Activities.Api (in UiPath.Mail.Activities.Api.dll)

WithOnlyUnreadMessages(bool)

public GetOutlookMailOptions WithOnlyUnreadMessages(
	bool onlyUnreadMessages
)public GetOutlookMailOptions WithOnlyUnreadMessages(
	bool onlyUnreadMessages
)
onlyUnreadMessages Boolean

Whether to retrieve only unread messages

Return Value

GetOutlookMailOptions
Returns an updated instance of GetOutlookMailOptions.

WithOrder

Set the order of mail messages by date.

Namespace: UiPath.Mail.Activities.Api

Assembly: UiPath.Mail.Activities.Api (in UiPath.Mail.Activities.Api.dll)

WithOrder(EOrderByDate)

public GetOutlookMailOptions WithOrder(
	EOrderByDate order
)
order EOrderByDate
Order mail messages by date. Available values: NewestFirst or OldestFirst.

Return Value

GetOutlookMailOptions
Returns an updated instance of GetOutlookMailOptions.

WithTop

Set the number of messages to retrieve starting from the top of the list.

Namespace: UiPath.Mail.Activities.Api

Assembly: UiPath.Mail.Activities.Api (in UiPath.Mail.Activities.Api.dll)

WithTop(int)

public GetOutlookMailOptions WithTop(
	int top
)public GetOutlookMailOptions WithTop(
	int top
)
top Int32
The number of messages to retrieve.

Return Value

GetOutlookMailOptions
Returns an updated instance of GetOutlookMailOptions.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.