Verify email addresses right inside Google Sheets™ with MailTester Ninja for Google Sheets, our add-on: select a column, click Verify, and get a verdict next to each address. MailTester Ninja checks every address against the recipient's mail server, without sending any email. Prefer no add-on? The free Apps Script further down this page does the same job.
Install the add-on
MailTester Ninja for Google Sheets is listed on the Google Workspace™ Marketplace. Open the listing, click Install and allow the permissions described below: the add-on then appears in Google Sheets, under Extensions.
The MailTester Ninja add-on
- Install MailTester Ninja from the Google Workspace Marketplace, then open Extensions, then MailTester Ninja, then Open MailTester Ninja.
- Save your key in the sidebar: a free API token (50 checks a day, one every 30 seconds) or a paid key. The key is stored in your Google account, not in the spreadsheet, and the sidebar can remove it.
- Select the cells of one column that contain email addresses and click Verify selection. The code (
ok,koormb) and the verdict are written in the two columns to the right, at the speed your key allows, with a progress bar and a Stop button. - For a single cell, type
=MT_VERIFY(A2).
Permissions it asks for: showing its sidebar in Google Sheets; reading the cells you select and writing the verdicts, in the open spreadsheet only; and connecting to one external service, the MailTester Ninja API at happy.mailtester.ninja, the only address the add-on is allowed to reach.
Privacy: the add-on accesses no other file or data of your Google account. Only the email addresses you select are sent to MailTester Ninja to be verified, and we keep no copy of them. Details in our privacy policy (section Google Sheets Add-on) and our terms of use.
Without the add-on: Apps Script
A short script adds the =MT_VERIFY(A2) formula and verifies a whole column in one run: no add-on, no server, no install.
What you need
- A Google account and a spreadsheet with your addresses in column A.
- A key: a free API token to try it (50 checks a day, one request every 30 seconds) or a paid key for full speed. Use a token rather than
key=free: the keyless tier is counted per IP, and Google shares its IP addresses between users.
Set it up in two minutes
- Open your sheet and go to Extensions, Apps Script.
- Paste the content of our Code.gs script.
- In Project Settings, Script Properties, add
MAILTESTER_KEYwith your token or key. - Save the project.
The script
Copy it in full into the Apps Script editor, or download Code.gs.
/**
* MailTester Ninja for Google Sheets, via Apps Script.
*
* Setup:
* 1. In your Sheet: Extensions > Apps Script, paste this file.
* 2. Project Settings > Script Properties: add MAILTESTER_KEY = your key.
* To try it free, use a free token (50 checks a day, one request every 30 s):
* https://mailtester.ninja/free-email-verification-api/
* key=free does not suit Sheets: Google's servers share their IP addresses,
* and the keyless tier is counted per IP.
* Paid key (full speed): https://mailtester.ninja/verify-emails-unlimited/
* 3. Back in the Sheet, use the custom function: =MT_VERIFY(A2)
* or run verifyColumn() from the Apps Script editor for a whole column.
*/
var ENDPOINT = 'https://happy.mailtester.ninja/ninja';
function getKey_() {
var key = PropertiesService.getScriptProperties().getProperty('MAILTESTER_KEY');
if (!key) throw new Error('Set MAILTESTER_KEY in Script Properties: a free token from https://mailtester.ninja/free-email-verification-api/ or a paid key from https://mailtester.ninja/verify-emails-unlimited/');
return key;
}
function verifyOne_(email) {
var url = ENDPOINT + '?email=' + encodeURIComponent(email) + '&key=' + encodeURIComponent(getKey_());
var resp = UrlFetchApp.fetch(url, { muteHttpExceptions: true });
if (resp.getResponseCode() === 429) {
var lim = JSON.parse(resp.getContentText());
return { code: 'error', message: 'Free limit: ' + lim.message };
}
if (resp.getResponseCode() !== 200) return { code: 'error', message: 'HTTP ' + resp.getResponseCode() };
return JSON.parse(resp.getContentText());
}
/**
* Custom function: =MT_VERIFY("someone@example.com")
* Returns the human readable verdict (Accepted, Rejected, Catch-All, ...).
* Note: Sheets caches custom function results; edit the cell to refresh.
*/
function MT_VERIFY(email) {
if (!email) return '';
return verifyOne_(email).message || '';
}
/**
* Verify column A (from row 2), writing code to B and message to C.
* Respects the rate limit with a pause between calls.
*/
function verifyColumn() {
var sheet = SpreadsheetApp.getActiveSheet();
var last = sheet.getLastRow();
for (var row = 2; row <= last; row++) {
var email = sheet.getRange(row, 1).getValue();
if (!email) continue;
var r = verifyOne_(String(email).trim());
sheet.getRange(row, 2).setValue(r.code || '');
sheet.getRange(row, 3).setValue(r.message || '');
Utilities.sleep(getKey_().indexOf('mtf_') === 0 ? 30000 : 1000); // 30 s on a free token, ~1 s on Pro
}
}
Use it
- One cell:
=MT_VERIFY(A2)returns the verdict (Accepted, Rejected, Catch-All...). Sheets caches custom function results: edit the cell to refresh it. - A whole column: run
verifyColumn()from the editor. It reads column A from row 2, writes the code in column B and the message in column C, and paces itself to respect the rate limit.
| code | Meaning | What to do |
|---|---|---|
ok | Valid and deliverable | Keep the address. |
ko | Invalid, will bounce | Remove it from your list. |
mb | Uncertain (catch-all domain, server could not be probed) | Review it, or decide by risk. |
-- | No verdict (key problem, or free limit reached with HTTP 429) | Run it again later. Never delete the address on this answer. |
How fast
With a free token, verifyColumn() waits 30 seconds between rows, and an Apps Script run stops after 6 minutes: about 11 rows per run. A paid key goes 30 times faster.
Questions
Is there a MailTester Ninja add-on for Google Sheets?
Yes: MailTester Ninja for Google Sheets, listed on the Google Workspace Marketplace and described at the top of this page. The Apps Script does the same job without an add-on.
Is anything stored?
No. Each address is checked in real time and we keep no copy of the addresses you verify.
Try it now
Get a free API token, or see the plans for up to 200,000 checks a day. Full reference: API documentation and OpenAPI specification. Back to all integrations.
