2

I have a class for sending an email that uses the functions and properties of the EWS to do the service of reading boxes and sending an email. Using the @hotmail.com domain, I can read boxes and send emails normally. However, when I switch to my own domain created with GoDaddy, I get the following error:

Microsoft.Exchange.WebServices.Data.ServiceRequestException: 'The request failed. The remote server returned an error: (401) .'

In both cases, the Url that I pass to the Exchange.WebService Url property is this: https://outlook.office365.com/ews/exchange.asmx. However, as previously mentioned, I can only send from my personal email (gustavo_martins1991@hotmail.com). From the email I have with GoDaddy (contato@uailivreart.com), I can't. I need help figuring out which Url I should configure for the email with the domain uailivreart.com. Can anyone help?

.

Costa.Gustavo
  • 849
  • 10
  • 21
  • 1
    The FROM address and the email credential has to be from the same email account. You also need to use a credential where the password is encrypted (not a user name and password). – jdweng Aug 25 '23 at 00:41
  • As for the credentials, I'm using the same as the account. And always the email account (contato@uailivreart.com). The problem is in the url. – Costa.Gustavo Aug 25 '23 at 00:53
  • SMTP settings can be different on different email servers. See : https://clean.email/blog/email-settings/godaddy-workspace-email-settings – jdweng Aug 25 '23 at 09:22
  • I'd try using https://testconnectivity.microsoft.com/tests/o365 to test what your doing that should give you more information on what's happening and if it all configured correctly. – Glen Scales Aug 27 '23 at 23:48

0 Answers0