How to Send Emails from Shopify Flow Using SMTP
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.
Most of FlowRelay’s setup guides cover a specific provider’s API, but plenty of mail services, web hosts, and company mail systems hand out plain SMTP credentials instead (or in addition). FlowRelay’s SMTP option connects to any of them with just a host, port, username, and password. Here’s how to find those details and get your first email out from a Flow workflow.
What You'll Need
- A Shopify store on a plan that includes Shopify Flow
- FlowRelay installed on your store
- SMTP credentials for a mail server you can send through: a host, a port, a username, and a password
Step 1Find Your SMTP Credentials
Where these live depends on where your mail comes from. A web host or shared hosting panel usually lists them under Email Accounts or Mail Settings. Google Workspace and Microsoft 365 both publish SMTP relay details in their admin docs. Dedicated transactional providers, including several that FlowRelay also supports directly, such as Postmark, SendGrid, Mailgun, and Resend, offer SMTP as an alternative to their API in their dashboards, often under a heading like SMTP, SMTP Relay, or Integrations.
Whichever source you’re using, you’re looking for four things: a host (something like smtp.yourprovider.com), a port, a username (often a full email address, but sometimes an account ID or API-key-style string), and a password. That password is frequently a generated app password, SMTP token, or API key rather than your normal account password, so use whatever your provider specifically labels for SMTP access.
Step 2Pick the Right Port
The port determines how the connection gets encrypted, and providers don’t always make the choice obvious. Port 587 is the most common default: it starts the connection in plain text and upgrades to an encrypted one with STARTTLS. Port 465 connects with TLS from the first handshake and is treated that way by FlowRelay, so use it if your provider lists it. Port 25 is the traditional SMTP port, but most cloud platforms block outbound traffic on it, so providers rarely recommend it for application sending.
If your provider lists more than one option and you’re not sure which to pick, 587 is the safest default.
Step 3Install 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 over SMTP.
Step 4Connect SMTP 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 host, port, username, and password you found in the first step. FlowRelay tests the connection before saving it, so a typo in the host or the wrong port shows up immediately rather than after your first real send. If you want emails to go out under a different name or address than the account tied to these credentials, open Override sender and fill those in.
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 if your SMTP source has a sending limit you might hit.
Step 5Create 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 6Test Your Setup
Before you trust a live trigger, use the Send test email button in FlowRelay’s settings. It confirms your SMTP 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
“Can’t reach the server. Check the host and port, then try again.”
- Recheck the host for typos. It’s worth copying it directly from your provider’s SMTP settings page rather than retyping it
- Confirm the port matches what your provider expects for that host. 587 and 465 are the most common, and using the wrong one for a given host is a frequent cause of this
- Some providers run separate SMTP hosts for different regions, plans, or account types. Make sure you’re using the one tied to your specific account
“Connection timed out. Check the host and port, then try again.”
- A timeout usually means something between FlowRelay and the server is dropping the connection rather than actively rejecting it
- Try the alternate port your provider lists. If 587 times out, 465 sometimes gets through, and the reverse also happens
- If your provider has an IP allowlist for SMTP access, check that setting in their dashboard. An overly strict allowlist blocks outside connections like FlowRelay’s, even with correct credentials
“Can’t connect. Check the host, port, and credentials.”
- Copy the username and password again straight from your provider. Plenty of services generate a separate SMTP password or app-specific password that’s different from your regular login
- If your provider offers both account-login credentials and dedicated SMTP or API credentials, use the SMTP-specific ones; the two aren’t always interchangeable
- Regenerate the password or token in your provider’s dashboard if there’s any doubt it’s still valid, then update it in FlowRelay’s provider settings
“Private and local IP addresses aren’t allowed.”
- FlowRelay blocks hosts that resolve to private or internal network ranges, like
10.x.x.x,192.168.x.x, or127.0.0.1, as a security precaution - Check the host you entered against your provider’s documentation. It usually means the address points somewhere internal rather than at a public SMTP endpoint
- If you’re running your own mail server, it needs a public IP address or hostname that FlowRelay can reach over the internet; an internal-only address won’t work here