
Send Emails via Exchange Online

Drago Petrovic
Microsoft MVP
Sending emails directly from your application using Exchange Online can streamline communication and improve productivity. This guide walks you through the step-by-step process to configure your application to send emails using Microsoft 365 (Exchange Online).
Step 1: Understand the Available Options
Exchange Online supports three main methods for sending emails:
- SMTP AUTH Client Submission – Authenticate using an Office 365 mailbox and send emails via
smtp.office365.com. - Direct Send – Send emails directly to recipients in your organization without authentication.
- Microsoft 365 or Office 365 SMTP Relay – Send emails using a connector configured in Exchange Online.
Step 2: Choose the Right Method
For most applications, SMTP AUTH Client Submission is the recommended method. It supports sending emails to external recipients and works with most email clients and devices.
Step 3: Configure SMTP AUTH Client Submission
- Ensure SMTP AUTH is enabled for the mailbox you want to use.
- Use the following SMTP settings in your application:
SMTP Server: smtp.office365.com Port: 587 Encryption method: STARTTLS Authentication: Yes Username: your_email@yourdomain.com Password: your_password
- Ensure the mailbox has a valid license and is not blocked from sending emails.
Step 4: Configure Exchange Online
To allow your application to send emails via Exchange Online:
- Log in to the Microsoft 365 admin center.
- Navigate to Users > Active users and ensure the sending account is licensed and active.
- Go to Exchange admin center and verify that SMTP AUTH is enabled for the mailbox.
Step 5: Test Your Configuration
Use your application to send a test email. Monitor the email delivery and check for any errors. If issues occur, verify the SMTP settings and credentials.
Security Considerations
Security is paramount when configuring automated emails:
- Use OAuth 2.0: Whenever possible, use Modern Authentication (OAuth 2.0) instead of storing plain text passwords.
- App Passwords: If MFA is enabled and OAuth isn't supported by your app, use an App Password.
- Least Privilege: Restrict access to the sending mailbox to prevent abuse.
Conclusion
By following these steps, you can successfully configure your application to send emails via Exchange Online. This setup ensures secure and reliable email delivery using Microsoft 365 infrastructure.