Outlook email

Hi all, last question from me.
I have to send an attached file by email, but the bot should be run on different computer.
How am I supposed to make it work on each computer with each account.
Email should be send from the current user, running the bot, to the current user.

Hi @zhasmina.dimitrova,

In Send Outlook Mail Message Activity, if you leave empty the Account section, robot will take the current user mail account on the machine.

Regards
Ömer

It’s empty, however the activity wants and email provided in “To” section.

Hi @zhasmina.dimitrova

Are you not using outlook activities?

Can you please tell which activity are you using

You can always variablize it with Environment.UserName which gives the current username
Make sure to append domain name like Environment.UserName + “gmail.com

To is where you would want to send the email

You can leave account so that they would be automatically current user or use above mentioned

Cheers

1 Like

@zhasmina.dimitrova,

You need to give To parameter of the activity. This is the property of the “message to be send to who.”

Input-Account could be empty.

Regards
Ömer

I am using Send Outlook Mail Message.
when I use system.Environment.UserName + “@email.com
it takes the user name from the system, not from the email (they are different)
Thats why I am not able to send it.
It should take the current user’s outlook email and send it go him.

Hi @zhasmina.dimitrova

You can always maker it into variable/Argument and pass whichever account that you want to it from arguments/variables. Or you can create a credential in Windows credential vault and use it from there and on any system that you run you can create the credential in windows vault on that system with required email details

Use get secure credentials

cheers