If you are getting an error like “SMTPDataError:… SMTP; Client does not have permissions to send as this sender

It seems a normal scenario to use office 365 as a email server with Odoo but there are some known issues while you configure it.

  1. It will not directly allow you to use multiple FROM address or different FROM address then the sender address which is being used in authentication. E.g. you have configured alice@example.com and you would like to set no-reply@example.com as a FROM address. This will be needed when you want all your Odoo users to send emails using same FROM address.

As a solution, you have a couple of options,

  1. You can relay your outbound emails from an another MTA like Sendgrid and use the multiple sender addresses.
  2. You may create a security group and follow the steps below,
    1. Create a security group e.g. no-reply@example.com
    2. Add all email accounts to that group and give send as permission.
    3. Try sending an email and it should work!
  3. Check out reverse DNS settings of your domain name and make sure that its mapped to the return path properly.