Outlook requires Allow access when sending email

Hi,

I am trying to send mail using Outlook. The process is to read the email folder and check for mail with specific subject. If found, send an email to the target users.

I have completed implementing the logic but it seems outlook shows a pop-up to Allow UIPath to access the mail and for sending too.

Is there any way to add UIPath to the trust list of Outlook so that it won’t ask me to allow each time?

Can anyone provide any info on this?

Hi,
you may try to look into “Trust Center Settings” in “Outlook Options”. There is “Programmatic Access Security” tab which might solve your problem. But I do not have direct experience with this.

Cheers,
Josef

3 Likes

Hi there @sesha,
Alternatively, if you are unable to achieve this, you can possibly utilise a parallel, checking for the ‘Allow’ popup or a retrieved Mail Message.

If the popup appears, handle it accordingly, then get the mail messages again.

Otherwise, simply continue.

3 Likes

Hi @J0ska,

I can’t lower the settings in Programmatic Access Security. Anyways thanks for your input.

@Mr_JDavey,
Thanks for your input. I’ll check this one out

HI @sesha

How did you solve this issue?

Hi,

This seems to be outlook/microsoft specific problem and there are suggestion in google to fix the issue with group policy or in some cases with direct registry editing.

Same issue appeared in our automation and we are looking for how to solve this re-appearing issue.

Hi, did anybody figure out how to solve this issue?

Yes. There are 3 options:

  1. update windows, antivirus and outlook
  2. change the security in outlook
  3. start a parallel activity : do your stuff with access to outlook (i.e read/send email) || intercept the popup and click on Yes. The interception must be done with continue on error, because if you will do a second action within a certain time frame, the popup will not appear.

Options 1&2 are covered here Program is trying to send an e-mail message on your behalf - Outlook | Microsoft Learn

2 Likes

Yes.

  1. Open Outlook as Administrator (right click on the Outlook application → Run as Administrator)
  2. In top menu bar, click File
  3. Click Options
  4. Click Trust Center
  5. Click Trust Center Settings
  6. Click Programmatic Access
  7. Select “Never warn me about suspicious activity”
  8. Click OK
11 Likes

Thanks!!

Parallel Activity helps. (y) Ty for the suggestion.

1 Like

@SreePrakash Thanks. That worked for me.

1 Like

thank youuuuu

1 Like

Hello Ciprian, Could you please share workflow for the same.

Hello @ashutoshkhantwal, Could you please share your workflow(XAML) file here.

Hi,

I’m not using anymore that flow as the issue was solved by the windows administrator.
However, it was not a difficult one. Just have a parallel activity that contains

  1. opening outlook
  2. clicking on yes in the response window

Hi, Thanks for your reply.
I have tried using parallel activity. first I used Get Outlook Activity and secondly I used element Exist for below pop up and then I clicked on checkbox->10 mint->allow. But it is not working while using send mail activity in place of Get Outlook.

image

Hi Mohini,

Which solution are you looking for here?

Hello Mohini, you to handle this in a parallel activity since these settings are controlled by the administrator and unless you have those rights you can’t modify the settings.

1 Like