activities
latest
false
UiPath logo, featuring letters U and I in white

Productivity activities

Last updated Feb 19, 2026

SendMailOptions

Options used to send an email message.

Namespace: UiPath.Mail.Activities.Api

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

Properties

PropertyTypeDescription
Attachments<ListString>A list of files to send as attachments.
Bcc<ListString>The hidden recipients of the email message.
BodystringThe body of the email message.
Cc<ListString>The secondary recipients of the email message.
ForwardedMessageMailMessageThe message to forward.
IsBodyHtmlboolSpecifies whether the body of the message is written in HTML format.
ReplyTo<ListString>The email address to use when replying.
SubjectstringThe subject of the email message.
To<ListString>The main recipients of the email message.

SendMailOptions Methods

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

WithAttachments

Set a list of files to send as attachments.

Namespace: UiPath.Mail.Activities.Api

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

WithAttachments(List<string>)
public SendMailOptions WithAttachments(
	List<string> attachments
)
public SendMailOptions WithAttachments(
	List<string> attachments
)

attachments List<String>: The list of files to attach.

Return Value

SendMailOptions: Returns an updated instance of SendMailOptions.

WithBcc

Set the hidden recipients of the email message.

Namespace: UiPath.Mail.Activities.Api

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

WithBcc(List<string>)
public SendMailOptions WithBcc(
	List<string> bcc
)
public SendMailOptions WithBcc(
	List<string> bcc
)

bcc List<String>: The list of hidden recipients.

Return Value

SendMailOptions: Returns an updated instance of SendMailOptions.

WithBody

Set the body of the email message.

Namespace: UiPath.Mail.Activities.Api

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

WithBody(string)
public SendMailOptions WithBody(
	string body
)
public SendMailOptions WithBody(
	string body
)

body String: The body of the email message.

Return Value

SendMailOptions: Returns an updated instance of SendMailOptions.

WithCc

Set the secondary recipients of the email message.

Namespace: UiPath.Mail.Activities.Api

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

WithCc(List<string>)
public SendMailOptions WithCc(
	List<string> cc
)
public SendMailOptions WithCc(
	List<string> cc
)

cc List<String>: The list of secondary recipients.

Return Value

SendMailOptions: Returns an updated instance of SendMailOptions.

WithForwardedMessage

Set an email message to forward.

Namespace: UiPath.Mail.Activities.Api

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

WithForwardedMessage(MailMessage)
public SendMailOptions WithForwardedMessage(
	MailMessage forwardedMessage
)
public SendMailOptions WithForwardedMessage(
	MailMessage forwardedMessage
)

forwardedMessage MailMessage: The email message to forward.

Return Value

SendMailOptions: Returns an updated instance of SendMailOptions.

WithHtmlBody

Set whether the body of the message is written in HTML format.

Namespace: UiPath.Mail.Activities.Api

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

WithHtmlBody(bool)
public SendMailOptions WithHtmlBody(
	bool isBodyHtml
)
public SendMailOptions WithHtmlBody(
	bool isBodyHtml
)

isBodyHtml Boolean: Whether the body of the message is written in HTML format.

Return Value

SendMailOptions: Returns an updated instance of SendMailOptions.

WithReplyTo

Set the email addresses to use when replying.

Namespace: UiPath.Mail.Activities.Api

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

WithReplyTo(List<string>)
public SendMailOptions WithReplyTo(
	List<string> replyTo
)
public SendMailOptions WithReplyTo(
	List<string> replyTo
)

replyTo List<String>: The list of email addresses to reply to.

Return Value

SendMailOptions: Returns an updated instance of SendMailOptions.

WithSubject

Set the subject of the email message.

Namespace: UiPath.Mail.Activities.Api

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

WithSubject(string)
public SendMailOptions WithSubject(
	string subject
)
public SendMailOptions WithSubject(
	string subject
)

subject String: The subject of the email message.

Return Value

SendMailOptions: Returns an updated instance of SendMailOptions.

WithTo

Set the main recipients of the email message.

Namespace: UiPath.Mail.Activities.Api

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

WithTo(List<string>)
public SendMailOptions WithTo(
	List<string> to
)
public SendMailOptions WithTo(
	List<string> to
)

to List<String>;: The list of main recipients.

Return Value

SendMailOptions: Returns an updated instance of SendMailOptions.

  • Properties
  • SendMailOptions Methods
  • WithAttachments
  • WithBcc
  • WithBody
  • WithCc
  • WithForwardedMessage
  • WithHtmlBody
  • WithReplyTo
  • WithSubject
  • WithTo

Was this page helpful?

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