Forum Discussion
Exchange 365 - sendmail php
Hi Dennis,
Microsoft 365 now only supports modern authentication/OAuth. Microsoft has deprecated all legacy authentication protocols but made an exception for SMTP AUTH (587/TCP).
1. SMTP AUTH prerequisites
- A user with a mailbox (at least a Exchange Online P1 license)
- SMTP AUTH has to be enabled at the user- or tenantlevel
- Security defaults has to be turned off
- MFA has to be disabled in the per-user MFA portal
- The user has to be excluded from the conditional access policy that enforces MFA
2. SMTP AUTH settings
Please check this link:
https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365#how-to-set-up-smtp-auth-client-submission
3. Azure portal
Please check the sign-in logs in the Azure portal and look for the connection attempts (interrupted or failure).
https://learn.microsoft.com/en-us/azure/active-directory/reports-monitoring/concept-sign-ins
4. Alternative 1: SMTP
You can still use 25/TCP (unauthenticated) when you create a connector in the EXO admin center and whitelist the public IP from where your emails originate. Also, don't forget to add the public IP to SPF-record for the public domain.
5. Alternative 2: SendGrid
SendGrid can be a valid alternative.