Microsoft 365 logo

How to Send Emails from Shopify Flow Using Microsoft 365

Shopify Flow can automate a lot, but it can’t send a custom email on its own: no order confirmations in your own words, no internal alerts, no win-back messages outside Shopify’s default notifications. FlowRelay fixes that with a Send transactional email action that routes each message through an email provider you choose.

If your team already runs on Microsoft 365 (formerly Office 365), you can send through one of your own mailboxes over SMTP without signing up for a separate service. FlowRelay’s SMTP option connects to Microsoft 365 with a host, port, username, and password. The catch is that Microsoft 365 ships with SMTP turned off for most mailboxes, so the real work is on the Microsoft side: enabling authenticated SMTP, sorting out the password, and knowing the exact server settings. Here’s how to do all of that and get your first email out from a Flow workflow.

One thing to know before you start: Microsoft is phasing out the basic username-and-password SMTP method this guide relies on. It works today, but it’s scheduled to be disabled by default for existing tenants at the end of December 2026 (an admin can still turn it back on), and unavailable by default for tenants created after that. Microsoft’s long-term replacement is OAuth. For now, basic SMTP is fine; just don’t be surprised if Microsoft tightens this down the line.

What You'll Need

Step 1Pick the Mailbox You'll Send From

Decide which mailbox FlowRelay will authenticate as. This can be a normal user mailbox, but a dedicated mailbox (something like [email protected]) is the cleaner choice: it keeps automated mail separate from a person’s inbox, and you can manage its password and permissions without disrupting anyone.

Whatever you pick, it has to be a licensed mailbox with Exchange Online. In the Microsoft 365 admin center under Users → Active users, the mailbox needs a license assigned; if there’s no Mail tab on the user, there’s no mailbox to send from yet.

Note the full email address now, you’ll use it as both the SMTP username and, by default, the From address on your emails.

Step 2Enable Authenticated SMTP for the Mailbox

Microsoft 365 disables SMTP sending (it calls this Authenticated SMTP) for most mailboxes by default, so you have to turn it on for the one you chose.

In the Microsoft 365 admin center, go to Users → Active users, select the mailbox, open the Mail tab, and click Manage email apps. Find Authenticated SMTP, check it, and save. (Admins who prefer PowerShell can run Set-CASMailbox -Identity [email protected] -SmtpClientAuthenticationDisabled $false instead.)

Two tenant-wide settings can override this and block SMTP even after you’ve enabled it on the mailbox:

  • Security Defaults. If your tenant has Security Defaults turned on, it blocks basic-auth SMTP across the whole tenant, no matter what the mailbox setting says. Sending through Microsoft 365 over SMTP generally requires Security Defaults to be off (or the sending account excluded via a Conditional Access policy). This is an admin-level decision, so loop in whoever owns your tenant security if you’re not sure.
  • The organization-wide SMTP setting. An admin can confirm it with Get-TransportConfig | Format-List SmtpClientAuthenticationDisabled. If that comes back True, SMTP is disabled tenant-wide and the per-mailbox checkbox won’t help until it’s changed.

Step 3Sort Out the Password

What you use as the SMTP password depends on whether the mailbox has multi-factor authentication (MFA).

No MFA on this mailbox: use the mailbox’s normal password as the SMTP password. This is the simplest setup and is a common reason to use a dedicated sending mailbox.

MFA enabled on this mailbox: the regular password won’t work for SMTP, because SMTP can’t answer an MFA prompt. You need to generate an App Password and use that instead. App passwords are available when the account uses per-user MFA (or Security Defaults); sign in as that user, go to Security info at mysignins.microsoft.com/security-info, choose Add method → App password, name it (e.g. “FlowRelay SMTP”), and copy the generated password. It’s shown only once. Note that some tenants that enforce MFA purely through Conditional Access don’t offer app passwords at all; in that case the practical path is a dedicated sending mailbox without interactive MFA.

Keep this password handy for the connect step.

Step 4Know Your Microsoft 365 SMTP Settings

Microsoft 365’s SMTP settings are the same for every tenant:

  • Host: smtp.office365.com
  • Port: 587 (STARTTLS)
  • Username: the full email address of the mailbox from step one
  • Password: the mailbox password, or the app password from the previous step

Use port 587. Microsoft 365 doesn’t accept SMTP submission on port 465 at this host, and port 25 is for server-to-server mail and is widely blocked, so 587 with STARTTLS is the only client-submission option. The connection also requires TLS 1.2 or higher, which FlowRelay uses by default.

Step 5Install FlowRelay on Your Shopify Store

Install FlowRelay from the Shopify App Store and accept the requested permissions.

On first launch, FlowRelay shows a short setup checklist: set your sender name and email, connect a provider, and send a test email. The next step covers connecting Microsoft 365 over SMTP.

Step 6Connect Microsoft 365 to FlowRelay

In FlowRelay, open Settings, find Email delivery, and click Manage providers to open the Connect email provider dialog.

Pick SMTP from the provider list and fill in the Microsoft 365 details: host smtp.office365.com, port 587, your mailbox address as the username, and the mailbox or app password. FlowRelay tests the connection before saving it, so a wrong password or a mailbox that still has SMTP disabled shows up immediately rather than after your first real send.

By default Microsoft 365 sends mail as the mailbox you authenticated with. If you want emails to go out under a different name or address, open Override sender and fill those in, but be aware Microsoft 365 will reject a From address the mailbox isn’t allowed to use (see the common issues below).

Click Connect. Whichever provider you connect first becomes your Primary, and FlowRelay routes all outbound mail through it. You can connect a second provider later as an automatic Fallback, which is worth doing here since a single Microsoft 365 mailbox has daily sending limits you could hit at volume.

Step 7Create Your First Flow Trigger

Open Shopify Flow, create a new workflow, and pick a trigger (Order created is a common one to start with). Add the Send transactional email action; it shows up in the action list once FlowRelay is installed.

You’ll need to fill in a few fields on the action: an email address for the recipient (this can pull straight from the trigger, like the customer’s email), a subject line, and the body, which is the actual HTML content of the email. There’s also an optional preview text field for the snippet shown in inbox previews. For the body, you can write plain HTML or use Liquid to pull in order details, customer names, and other data from the workflow.

Save the workflow and turn it on.

Step 8Test Your Setup

Before you trust a live trigger, use the Send test email button in FlowRelay’s settings. It confirms your Microsoft 365 connection is wired up correctly and shows you where the message lands.

Once that test email arrives, run your Flow workflow under real conditions, like placing a test order, and check FlowRelay’s delivery log to confirm the email went out and see its delivery status.

Common Issues

“535 5.7.139 Authentication unsuccessful” / “Can’t connect. Check the host, port, and credentials.”

  • Confirm Authenticated SMTP is checked for this mailbox under Users → Active users → Mail → Manage email apps. A brand-new or default mailbox almost always has it off, and this is the single most common cause
  • If the mailbox has MFA, the regular password won’t authenticate over SMTP. Generate an App Password and use that instead
  • Check whether Security Defaults is enabled for the tenant. Security Defaults blocks basic-auth SMTP across the whole tenant and overrides the per-mailbox checkbox; an admin needs to turn it off or exclude this account
  • Make sure the username is the full email address and the mailbox is licensed with Exchange Online. An unlicensed account has no mailbox to authenticate against

“550 5.7.30 Basic authentication is not supported for Client Submission”

  • This is Microsoft’s basic-auth deprecation taking effect: the tenant is no longer accepting username-and-password SMTP. It can appear once basic auth is disabled by default (end of December 2026 for existing tenants) or on newer tenants where it’s off from the start
  • An admin can re-enable basic auth for SMTP AUTH at the tenant level as a temporary measure, but Microsoft is removing that option entirely in 2027
  • The durable fix is to move off basic SMTP to OAuth, or to send through a dedicated transactional provider (several of which FlowRelay supports directly) and keep Microsoft 365 for regular mail

“5.7.60 Client does not have permissions to send as this sender” (the From address is rejected)

  • Microsoft 365 only lets a mailbox send mail as itself unless you grant it permission. By default, send as the same mailbox you authenticated with
  • Check FlowRelay’s sender details and any Override sender fields, the From address there has to match the authenticated mailbox exactly
  • If you genuinely need to send as a different address (say a shared support@ mailbox), have an admin grant this mailbox Send As permission on that address in the Exchange admin center, then set that as your sender

“Connection timed out” or “Can’t reach the server”

  • Confirm the host is exactly smtp.office365.com and the port is 587. Microsoft 365 doesn’t accept submission on port 465 at this host, so if you entered 465 the connection will fail
  • Port 25 won’t work either; it’s reserved for server-to-server mail and is blocked for client sending. Stick with 587 and STARTTLS
  • If sending still times out and the credentials are right, the issue is usually one of the tenant-level blocks (Security Defaults or the org-wide SMTP setting) rather than the network

Sends suddenly stop or bounce with a rate / quota error

  • A single Microsoft 365 mailbox is rate-limited; Exchange Online caps it at roughly 10,000 recipients per day and around 30 messages per minute. High order volume or a burst of workflow emails can hit those ceilings
  • Spread sending across the day where you can, or move higher-volume mail to a dedicated transactional provider built for it
  • Connect a second provider in FlowRelay as a Fallback, so sends keep going out automatically if the Microsoft 365 mailbox is throttled or over its limit