E-commerce
Solidus email validation integration
A Ruby gem for your Solidus store checks the email of each order and customer account with our API when it is set or changed, at the checkout, at sign-up, in the admin and through the API. 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 guideGet an API key
- Setup guide
- A file you download
# Gemfile
gem "email-validation-solidus", path: "vendor/email-validation-solidus"
# config/initializers/email_validation.rb (optional)
EmailValidation::Solidus.configure do |config|
config.logger = Rails.logger
config.stop_on = %w[invalid disposable]
endAt 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
- Solidus stores 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 Solidus 4 store on Rails 7.2 to 8.1 with Ruby 3.2 or newer, and an API key made for it, with a daily credit cap, 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
Typical uses.
Guest checkout
The guest’s email is checked when it is typed at checkout; 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 account class are checked the same way, and a signed-in customer’s orders take 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, which stays the reference when a step does not match what you see.
Download the gem
The gem is not on RubyGems. Download it from the guide and unzip it into your app’s vendor/ folder, so that you have vendor/email-validation-solidus/.
Add it to your Gemfile
Add
gem "email-validation-solidus", path: "vendor/email-validation-solidus"aftersolidusand runbundle install. There is no generator and no migration.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.Try it free
Check
no_mailbox@sandbox.email-validation.orgwithbin/rails runnerandEmailValidation::Solidus.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.
Solidus copies a signed-in customer’s account email onto their order 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.
Connect Solidus.
Test it on our sandbox addresses for free, then on your own contacts.
Updated · Maintained by: Email Validation LLC