Why only password as String for Mail Activities?!

Dear Community & UiPath Team,

I would like to use the mail activities with a SecureString.
The activities only accept a normal string as password:

  • Send SMTP Mail Message
  • Get POP3 Mail Messages
  • Get IMAP Mail Messages



Ideally from a project perspective, individual can store credentials in orchestrator under assets.

In code, use Get Credential activity to retrieve username and password from the orchestrator and this uses secure string type for password. You can just pass the variable name used in Password field.

This way you can keep your password secure.

that won’t work as the activitiy only allows String variables (see screenshot)Capture


In that case, you can also try the another approach,
create two separate assests of string type in orchestrator, use get asset activity to retrieve theusername and password.

Pass the variables in their respective fields.

try this

1 Like

Hi thanks for the Input.
These are good work-around ideas.
I would like to keep the password as securedString retrieved from the Orchestrator. But dont see any option to do so?! I reckon the activity should not require a string even though it is a password!!!

Use the Get Credential.
Get Username and Password.
Password would be a secured string datatype.
In the password field enter, Password.toString

that doesnt work (the error sign disappears but doesnt transfer the correct password)

@LiB , correct…it does not transfer correct password. did you find any solution for that ?

Thanks in Advance