550 5.7.1 Client does not have permissions to send as this sender (office365)

roanjain picture roanjain · Aug 18, 2014 · Viewed 71.8k times · Source

i m trying to send email with following configuration

Host: smtp.office365.com

port: 587

user: "[email protected]"

pass: "mypassword"

i m getting the following exception :

550 5.7.1 Client does not have permissions to send as this sender

i have gone through many forums that told me to set send as permission for mailboxe but i m not able to find any such configuration in oulook web app...or do i need to configure it somewhere else and if it so then where..???....i have only used above configuration for sending mails and have not done any config with outlook web app...what all i need to change and configure in my outlook web app ....

Answer

Luís Cruz picture Luís Cruz · Oct 4, 2016

Beware that this error might also occur when the from email does not match the username.

So, be sure to test the value [email protected] is the same on user and from.

If it works when both fields have the same value and doesn't work when the from is different from the user, it means you should contact the company responsible for the email server and ask them to create a shared account and add SendAs priviledges for the account.