# Spree Commerce Email Validation Integration

URL: https://email-validation.org/integrations/spree/
Updated: 2026-12-05

> Documentation index: https://email-validation.org/llms.txt

A Ruby gem for your Spree Commerce store checks the email of each checkout and customer account with our API when it is set or changed, in the storefront, through the APIs, at sign-up and in the admin. By default only a definite invalid is refused, with one sentence on the email field, and an address goes through when our side cannot answer.

[Read the full setup guide](https://email-validation.org/docs/guides/spree/) [Get an API key](https://email-validation.org/signin/)

- Status: Setup guide
- A file you download

**Spree Commerce** Gemfile and initializer

What you add

```text
# Gemfile
gem "email-validation-spree", path: "vendor/email-validation-spree"

# config/initializers/email_validation.rb (optional)
EmailValidation::Spree.configure do |config|
  config.logger = Rails.logger
  config.stop_on = %w[invalid disposable]
end
```

## At a glance.

- **Status**: **Setup guide.** Not listed on a marketplace yet: you set it up yourself in a few steps, below and in the full guide.
- **For**: Spree Commerce stores (4.10, 5.x or 6.0) that want the checkout and sign-up to refuse an address that cannot receive the order confirmation, the receipt or the shipping notices.
- **You need**: A Spree 4.10, 5.x or 6.0 store with Ruby 3.2 or newer, and an [API key](https://email-validation.org/app/api-keys/) made for it, with a [daily credit cap](https://email-validation.org/docs/authentication/#limits), with the permission Validate addresses.
- **Costs**: 1 credit = 1 validated address, as with any API request. Free: unknown results, API errors, malformed addresses, test addresses on sandbox.email-validation.org, addresses on reserved domains such as example.com and, in a bulk list, repeats of an address (charged once).
- **Full guide**: [Read the full setup guide](https://email-validation.org/docs/guides/spree/)

## Typical uses.

- **Guest checkout**: The guest’s email is checked when it is typed at checkout (an order on Spree 4 and 5, a cart on Spree 6); an address that cannot receive mail gets an error on the field and can be corrected.
- **Customer accounts**: Sign-ups and email changes on your customer class are checked the same way, and a signed-in customer’s checkout takes that checked address.
- **Stricter rules**: Add disposable, catch\_all or unknown to stop\_on, word the sentences yourself, or refuse when the check cannot finish with fail\_open set to false.

## Set it up. 4 steps.

The short version of the [full setup guide](https://email-validation.org/docs/guides/spree/), which stays the reference when a step does not match what you see.

1. **Download the gem**: The gem is not on RubyGems. Download it from the guide and unzip it into your Rails app’s vendor/ folder (server/vendor/ in a create-spree-app project, after spree eject).
2. **Add it to your Gemfile**: Add `gem "email-validation-spree", path: "vendor/email-validation-spree"` and run `bundle install`. There is no generator and no migration.
3. **Set your key**: Set it in the server’s environment as `EV_API_KEY`, or read it from your credentials in the initializer, then restart the app. Never put it in code.
4. **Try it free**: Check `no_mailbox@sandbox.email-validation.org` with `bin/rails runner` and `EmailValidation::Spree.check`: it is refused. Then go through a guest checkout on a development store with your own address.

## Good to know.

- Only invalid is refused by default; stop\_on adds disposable, catch\_all or unknown.
- It fails open: no key, a timeout, a network error, a rate limit or any error answer lets the address through.
- Spree copies a signed-in customer’s account email onto their checkout without validations, so that address is checked on the account. Accounts made before you installed the gem were not checked.
- Each check uses one credit; unknown results and sandbox addresses are free.

## Related

- [The full Spree Commerce setup guide](https://email-validation.org/docs/guides/spree/)
- [Set it up, Spree 6 projects included](https://email-validation.org/docs/guides/spree/#setup)
- [What is checked, and when](https://email-validation.org/docs/guides/spree/#how)
- [Every setting](https://email-validation.org/docs/guides/spree/#options)
- [What each status means](https://email-validation.org/docs/statuses/)
- [Square email validation integration](https://email-validation.org/integrations/square/)
- [Stripe email validation integration](https://email-validation.org/integrations/stripe/)
- [ThriveCart email validation integration](https://email-validation.org/integrations/thrivecart/)
- [WHMCS email validation integration](https://email-validation.org/integrations/whmcs/)
- [All integrations](https://email-validation.org/integrations/)
