Go to Office.com admin center > Users > Active users.
Create a standalone user for the purpose of SMTP authentication, e.g. [email protected] with password XXYYZZ112233, as you don’t want to give the password of your existing users to apps (e.g. WordPress) that need to access your SMTP.
Edit the created account enabling SMTP authentication by Mail tab > Email apps > Manage email apps > Check “Authenticated SMTP” > Save changes.
SMTP account done.
Now, create a shared mailbox in Office 365 for the app to send email AS.
Go to Office.com admin center > Teams & groups > Shared mailboxes, and create a shared mailbox for your app, e.g. [email protected], with the newly created SMTP user as a member of it.
Finally, you can use these as your SMTP details for your new app:
- SMTP Host: smtp.office365.com
- Encryption: TLS
- Port: 587
- SMTP Username: [email protected]
- SMTP Password: XXYYZZ112233
And make sure to use the shared mailbox as From Email when you are sending, or Office 365 SMTP server will reject your request:
- From Email: [email protected]