Send Email as Confidential (outlook)


i want to mark an email as “confidential” but “send email” activity does’t have this option. What should i do?

Hi @ac_couto

Use Send Outlook Mail Message activity in Subject you can set it as Confidential

Ashwin S

Try like this:

Dim mail As New Net.Mail.MailMessage
mail.Headers.Add(“Sensitivity”, “Company-Confidential”)

There’s nothing to set as Confidential there…

Hi @bcorrea,

Where should i put that code?

which activity are you using to send email?

Send Outlook Mail Message from uipath.mail.outlook.activities

oh, that one dont support input mailmessage object…

Shoul i look foe a new package? which activity do you suggest?

Well, that would depend on what is available to you in your environment… do you know if you can use SMTP?

yes, i can.

ok, then it would be in an invoke code activity with code like this:
Dim Smtp_Server As New SmtpClient
Dim e_mail As New MailMessage()
Smtp_Server.UseDefaultCredentials = False
Smtp_Server.Credentials = New Net.NetworkCredential(“”, “password”)
Smtp_Server.Port = 587
Smtp_Server.EnableSsl = True
Smtp_Server.Host = “
e_mail = New MailMessage()
e_mail.Headers.Add(“Sensitivity”, “Company-Confidential”)
e_mail.From = New MailAddress(txtFrom.Text)
e_mail.Subject = “Email Sending”
e_mail.IsBodyHtml = False
e_mail.Body = txtMessage.Text


Thank you! :slight_smile:

1 Like