Skip to main content

MS365 Exchange

Setting up an SMTP connector for Microsoft 365 (formerly Office 365) allows you to send email through the Microsoft 365 Exchange Online service. This can be useful for applications, devices, or third-party email systems that need to send email. Here's how to set it up:

Step 1: Determine the Sending Scenario

There are three main scenarios for setting up an SMTP connector:

  1. SMTP Client Submission: Used for devices or applications that need to send email.
  2. Direct Send: Used to send email to recipients both inside and outside your organization without authentication.
  3. SMTP Relay: Used for relaying email to recipients both inside and outside your organization, using a connector in Exchange Online.

Step 2: SMTP Client Submission Setup

  1. Open Exchange Admin Center:

   - Go to the Microsoft 365 Admin Center and select "Exchange" from the admin centers.

  1. Get the SMTP Settings:

   - SMTP Server: `mail.mysmtp.com`

   - Port: `587`
   - Encryption: `STARTTLS`

  1. Configure Your Device or Application:

   - In your device or application, enter the following SMTP settings:

     - SMTP Server: ` mail.mysmtp.com `

     - Port: `587`

     - Encryption: `STARTTLS`

     - Authentication: Enabled

     - Username: Your Microsoft 365 email address

     - Password: Your Microsoft 365 password

Step 3: Direct Send Setup

  1. Identify Your MX Endpoint:

   - Go to the Microsoft 365 Admin Center.

   - Navigate to "Setup" > "Domains".

   - Select your domain and find the MX record, which will look like `domain-com.mail.protection.outlook.com`.

  1. Configure Your Device or Application:

   - Enter the following SMTP settings:

     - SMTP Server: `your-domain-com.mail.protection.outlook.com` (replace with your actual MX endpoint)

     - Port: `25`

     - Encryption: None or TLS

     - Authentication: None (your device or application must send email from an address associated with your Microsoft 365 domain)

Step 4: SMTP Relay Setup

  1. Set Up a Connector in Exchange Online:

   - Open the Exchange Admin Center.

   - Navigate to "Mail flow" > "Connectors".

   - Click on the "+" icon to create a new connector.

  1. Configure the Connector:

   - From: Your organization's email server.

   - To: Office 365.

   - Click "Next".

  1. Set Up the Connector Details:

   - Give the connector a name and description.

   - Choose "By verifying that the IP address of the sending server matches one of these IP addresses which belong to your organization".

   - Enter the public IP address of your sending device or application.

  1. Review and Create the Connector:

   - Review your settings and click "Create".

  1. Configure Your Device or Application:

   - Enter the following SMTP settings:

     - SMTP Server: `mail.mysmtp.com`

     - Port: `587`

     - Encryption: `STARTTLS`

     - Authentication: None

Additional Tips

- DNS Records: Ensure that your DNS records, especially SPF, DKIM, and DMARC, are configured properly to avoid email delivery issues.

- Firewall Settings: Make sure that your firewall allows outgoing connections on the SMTP ports you are using (25, 587).

- User Permissions: Ensure that the user account used for SMTP authentication has the appropriate permissions to send emails.

By following these steps, you can set up an SMTP connector for Microsoft 365 to send emails via mail.mysmtp.com