Guide · Clean a list in your platform

Cleaning the email addresses of Shopify customers

To clean the email addresses of your Shopify customers, check them, keep each result on the customer, and send your campaigns to a segment that leaves the bad ones out. Shopify stops mailing an address after mail to it has bounced, or after the customer has complained or unsubscribed, and its Smart delivery leaves out subscribers who have not engaged with recent mail.

Reading time
7 min

Choose a way

You want toUse
Block a bad address before the customer existsForm Guard on your theme's newsletter, contact and create-account forms (not checkout, log-in forms or Shopify's own customer account pages)
Flag new and changed customersThe webhook relay: it flags each customer once added, and never blocks a sign-up or a checkout
Clean the customers you already haveOur clean-up command: it checks every customer and saves the result on the customer, in metafields and, if you ask, a tag. It runs on your own computer with Node. Start with step 1.
Clean them without installing anythingExport your customers as CSV in Shopify, check the file as a bulk list, then unsubscribe the ones to remove by hand (step 3)
Check a file before you import itA bulk list: Shopify itself advises checking addresses with a verification tool before you import them. Go to Check a file before you import it.

What Shopify already does on its own

Shopify Messaging is Shopify's own app for email campaigns.

All of this happens after you send. A check looks at the addresses before the next send. It finds mailboxes that no longer exist (no_mailbox, which would bounce with a reply like 550 5.1.1), disposable addresses, and addresses that accept mail but should not be mailed, such as known spam traps. It also tells you which domains are catch-all, where a single mailbox cannot be confirmed.

Step 1: Check your customers

Follow our Shopify setup guide: create a custom app for your store, run the command once with --setup, which creates the four metafield definitions so Shopify shows them by name, then run the clean-up command with --tags (Clean your customers):

node clean.mjs --setup
node clean.mjs --tags

Both use the key and store settings of the setup guide. Each checked customer gets four metafields in the namespace email_validation and one tag for its status:

TagStatusWhat to do
email-validvalidsend, apart from the few in step 3
email-invalidinvalidleave out: the address cannot receive mail
email-disposabledisposableleave out: a throwaway inbox
email-catch_allcatch_allsend with care, see step 4
email-unknownunknowncheck again later, see step 4

The tag shows the status. The reason is in the metafield email_validation.reason, for example no_mailbox or spamtrap. Each reason has an action, send, send_with_caution, remove or retry_later (actions). Every invalid and disposable address has the action remove.

To check new and changed customers as they come in, the setup guide also has a webhook relay that writes the same metafields, and the same tags when you turn tags on for it.

Step 2: Send to a segment that leaves the bad addresses out

Create a customer segment with this query (Shopify-based customer segment filters):

email_subscription_status = 'SUBSCRIBED'
AND customer_tags NOT CONTAINS 'email-invalid'
AND customer_tags NOT CONTAINS 'email-disposable'

Then, when you create a campaign in Shopify Messaging, choose this segment in the To field (Create email marketing campaigns using Shopify Messaging). Shopify's page does not describe a way to exclude one segment from another, so the exclusion sits in the query.

A customer added after your check has no tag yet, so this segment still includes it. Run the command again for new customers, or use the relay.

Step 3: Unsubscribe the valid addresses that should not be mailed

A few addresses are valid, because the mailbox accepts mail, but have the action remove. A known spam trap is one: its reason is spamtrap. Their tag is email-valid, so the segment in step 2 still includes them.

  1. Export your customers: go to Customers > Export, choose All customers, tick Customer metafields, choose Plain CSV file and click Export customers. With more than 50 customers, Shopify emails you the file (Importing and exporting customer lists).
  2. In a spreadsheet, filter the column of email_validation.reason to the reasons whose action is remove: spamtrap, trap_pattern, complainer, suppressed and abuse_linked.
  3. For each of these customers, open the customer in Shopify, choose Manage > Edit marketing settings, turn off email marketing consent and click Save (Managing customers).

They are then no longer SUBSCRIBED, so the segment leaves them out.

Step 4: Handle the caution and retry customers

Check a file before you import it

To add a list of customers from another system, check the file first. Upload the CSV as a bulk list in the dashboard. You do not need to remove duplicates first, and duplicates, malformed addresses and unknown results cost nothing (cost).

When the check is complete, click Download all rows for a CSV of every row with your original columns (download options). Not Download valid addresses or Download safe-to-send addresses: one holds only the valid rows, the other only the rows whose action is send, so the rows you act on below would be missing. Each row keeps your columns, followed by our result columns. Three of them matter here:

ColumnWhat it holds
ev_statusvalid, invalid, catch_all, unknown or disposable
ev_reasonwhy, for example no_mailbox, spamtrap or role_account
ev_actionsend, send_with_caution, remove or retry_later

Decide by ev_action, not by the status alone: a spam trap is valid, but its action is remove.

  1. Delete the rows whose ev_action is remove, then delete our result columns, and save the file as CSV in UTF-8.
  2. Import it under Customers > Import. The file can be up to 15 MB, and the Email column is required. Set Accepts Email Marketing to yes only for people who agreed to hear from you: Shopify warns that importing people who opted out as subscribers can cause spam complaints (Importing and exporting customer lists).

Unsubscribe, do not delete

Shopify cannot delete a customer who has an order, and deleting removes the whole customer profile (Managing customers). A customer whose address is bad is still a buyer with a history. Unsubscribe the customer from email marketing, as in step 3, and keep the profile and its orders.

Questions

Does Shopify stop mailing bounced addresses by itself?

Yes, after the bounce. Shopify Messaging suppresses an address once mail to it has bounced because of a problem with the address. A check finds the addresses that would bounce before you send to them.

Try it

Check one address in the free email checker, or upload a customer file for bulk email verification.

Sources

Shopify's help pages below were read on 2026-11-20.

More on Shopify

How we wrote this: drafted by the email-validation.org team with the help of AI writing tools, from our product documentation and the sources linked in the text.

Get up to 500 free credits. No card needed.

New accounts get 500 free credits (100 when you sign up with a free email provider such as Gmail, Outlook or Yahoo, another personal mailbox such as a paid one like Fastmail or one from your internet provider, or an address from a relay or alias service). Try it on your own list before you buy.

Updated · Maintained by: Email Validation LLC