Getting error when using Send Exchange Mail Message

Hello guys,

I just get an error like “Send Exchange Mail Message: The request failed. The remote server returned an error: (401) Unauthorized.” when I try to run my robot.

I’m using https://outlook.office365.com as a server.
How can I fix this? Thank you

@claudiojody

Are you providing proper credentials or not ?

hi @claudiojody

for the office365 server use Exchange mail activity, for SMTP, server address
will be different (As per my understanding) so go with send exchange mail it works

Sorry, how can I know if I’m using proper credentials or not?

I’m using send exchange mail message

Sorry i did not notice it

hi @claudiojody

Have you find any solution for the above?

If not please use your email address as user name and windows password as Password,
or environment.username as username and windows password.

this will solve the problem.

i guess it is too late :slight_smile:

I am fencing the same Issue

Send Exchange Mail Message: The request failed. The remote server returned an error: (401) Unauthorized.

I used Server: “https://outlook.office365.com/EWS/Exchange.asmx”
Password & UserId is correct

Hi @suraj23
How you are passing the username?
Try both the ways mentioned below

  1. Username : email id
    Example :
    abcd@organisation.com
    2 username : domain\username
    STLIPL\abcd

Hi @Ajju
Thanks for suggestion, but it’s not working, giving same error

Send Exchange Mail Message: The request failed. The remote server returned an error: (401) Unauthorized.

can you share a screenshot how you passing the credential (just for reference),

also can you check is there any particular sever address for exchange mail server in your org,

for me i have a different exchange mail server address and i cannot use " https://outlook.office365.com/EWS/Exchange.asmx”"

my exchange server address is somthinng like below
https://mail.myorg123.com/esd23/exchange.asmx