UiPath Documentation
activities
latest
false
Productivity activities

SendSmtpMailOptions

Options used to send an SMTP email message.

Options used to send an SMTP email message.

Namespace: UiPath.Mail.Activities.Api

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

Inheritance: System.Object >.SendMailOptions > SendSmtpMailOptions

Project compatibility​

Windows - Legacy | Windows

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.
SenderMailstringThe email address of the sender.
SenderNamestringThe display name of the sender.
To<ListString>The main recipients of the email message.

SendSmtpMailOptions Methods​

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

FromMailOptions​

Creates a SendSMTPMailOptions object from a SendMailOptions object.

Namespace: UiPath.Mail.Activities.Api

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

FromMailOptions(SendMailOptions)​
public static SendSmtpMailOptions FromMailOptions(
 SendMailOptions options
)
public static SendSmtpMailOptions FromMailOptions(
 SendMailOptions options
)

options SendMailOptions : The SendMailOptions object used to create the SendSMTPMailOptions object.

Return value​

SendSMTPMailOptions

The options used to send the SMTP email message.

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 SendSmtpMailOptions WithAttachments(
 List<string> attachments
)
public SendSmtpMailOptions WithAttachments(
 List<string> attachments
)

attachments &lt;ListString&gt; : The list of files to attach.

Return Value​

SendSmtpMailOptions : Returns an updated instance of SendSmtpMailOptions.

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 SendSmtpMailOptions WithBcc(
 List<string> bcc
)
public SendSmtpMailOptions WithBcc(
 List<string> bcc
)

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

Return Value​

SendSmtpMailOptions : Returns an updated instance of SendSmtpMailOptions.

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 SendSmtpMailOptions WithBody(
 string body
)
public SendSmtpMailOptions WithBody(
 string body
)

body String : The body of the email message.

Return Value​

SendSmtpMailOptions : Returns an updated instance of SendSmtpMailOptions.

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 SendSmtpMailOptions WithCc(
 List<string> cc
)
public SendSmtpMailOptions WithCc(
 List<string> cc
)

bcc List<string> : The list of secondary recipients.

Return Value​

SendSmtpMailOptions : Returns an updated instance of SendSmtpMailOptions.

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 SendSmtpMailOptions WithForwardedMessage(
 MailMessage forwardedMessage
)
public SendSmtpMailOptions WithForwardedMessage(
 MailMessage forwardedMessage
)

forwardedMessage MailMessage : The email message to forward.

Return Value​

SendSmtpMailOptions : Returns an updated instance of SendSmtpMailOptions.

WithForwardedMessage​

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 isBodyHtml)​
public SendSmtpMailOptions WithHtmlBody(
 bool isBodyHtml
)
public SendSmtpMailOptions WithHtmlBody(
 bool isBodyHtml
)

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

Return Value​

SendSmtpMailOptions : Returns an updated instance of SendSmtpMailOptions.

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> replyTo)​
public SendSmtpMailOptions WithReplyTo(
 List<string> replyTo
)
public SendSmtpMailOptions WithReplyTo(
 List<string> replyTo
)

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

Return Value​

SendSmtpMailOptions : Returns an updated instance of SendSmtpMailOptions.

WithSender​

Sets the SenderName and SenderMail properties. Visit SendSmtpMailOptions to learn about the properties for the SendSMTPMailOptions class.

Namespace: UiPath.Mail.Activities.Api

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

WithSender(string, string)​
public SendSmtpMailOptions WithSender(
 string name,
 string mail
)
public SendSmtpMailOptions WithSender(
 string name,
 string mail
)

name String : The display name of the sender.

mail String : The email address of the sender.

Return value​

SendSMTPMailOptions

Returns an updated instance of SendSMTPMailOptions, that you can use to send SMTP mail messages.

WithSenderMail​

Sets the SenderMail property. Visit SendSmtpMailOptions to learn about the properties for the SendSMTPMailOptions class.

Namespace: UiPath.Mail.Activities.Api

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

WithSenderMail(string)​
public SendSmtpMailOptions WithSenderMail(
 string mail
)
public SendSmtpMailOptions WithSenderMail(
 string mail
)

mail String : the email address of the sender.

Return value​

SendSMTPMailOptions

Returns an updated instance of SendSMTPMailOptions, that you can use to send SMTP mail messages.

WithSenderName​

Sets the SenderName property. Visit SendSmtpMailOptions to learn about the properties for the SendSMTPMailOptions class.

Namespace: UiPath.Mail.Activities.Api

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

WithSenderName(string)​
public SendSmtpMailOptions WithSenderName(
 string name
)
public SendSmtpMailOptions WithSenderName(
 string name
)

name String : The display name of the sender.

Return value​

SendSMTPMailOptions

Returns an updated instance of SendSMTPMailOptions, that you can use to send SMTP mail messages.

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 subject)​
public SendSmtpMailOptions WithSubject(
 string subject
)
public SendSmtpMailOptions WithSubject(
 string subject
)

subject String : The subject of the email message.

Return Value​

SendSmtpMailOptions : Returns an updated instance of SendSmtpMailOptions.

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(&lt;ListString&gt; to)​
public SendSmtpMailOptions WithTo(
 &lt;ListString&gt; to
)
public SendSmtpMailOptions WithTo(
 &lt;ListString&gt; to
)

to &lt;ListString&gt; : The list of main recipients.

Return Value​

SendSmtpMailOptions : Returns an updated instance of SendSmtpMailOptions.

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated