Bulk Email Validation with CSV File

Check in bulk, if email addresses in a .csv file are real before sending any messages.

Validation in a nutshell

An email address can look right but still be wrong. Our email validation api uses comprehensive email address validation to check if emails really exist without sending any messages.

Bulk Email validation using a CSV file

From the MailValidation.io dashboard you can upload a csv file to interactively validate any email address in it. This can be used to filter email group lists or just clean a list you captured with a promotion, or any number of other events. You have options for bulk email validation on several data points, from SMTP deliverability, to whether an email is on a blacklist, and even if it is a catch all or spam trap email address.

bulk email validation

Many software platforms allow for importing and exporting csv files, including form spreadsheets and email sending platforms like MailChimp and SendInBlue. For more control you may like to process the files using the api and shell scripts.

Bulk email validation using api and shell scripts

If you would like more control you can validate a csv file using your bulk email validation api key and the bellow bash shell script. First login to MailValidation.io account to get your API key and place it in the Authorization header.

Given an example file like emails-input.csv

				
					foo@bar.com
bar@test.com
				
			

If you run that through the bellow script.

				
					#!/bin/bash
while IFS='' read -r line || [[ -n "$line" ]]; do
    echo $line, `curl -X 'POST' \
  'https://app.mailvalidation.io/a/{team_slug}/validate/api/validate/' \
  -H 'accept: application/json' \
  -H 'Authorization: {apikey}' \
  -H 'Content-Type: application/json' \
   -d '{
  "email": "test@test.com"
}` | jq .is_valid`;
done < emails-input.csv > emails-output.csv
				
			

Then It will give you the output file that looks like this.

				
					foo@bar.com,true
bar@test.com,false
				
			

Support

Are you having trouble, have some questions. How can we help?