MailGuardMailGuard Configuration
DocsMailGuardMailGuard Configuration

MailGuard Configuration

MailGuardLast updated July 2026

Widget settings

Go to MailGuard → Manage Widgets and click a widget to configure it.

SettingDefaultDescription
Block disposableOnBlock throwaway email providers
Block invalid MXOnBlock domains with no mail server records
Block undeliverableOnBlock mailboxes that fail SMTP check
Block free providersOffBlock Gmail, Yahoo, Hotmail, Outlook etc.
Block role emailsOffBlock info@, admin@, noreply@, support@ etc.
Show inline errorOnShow error message below the input field
Block form submitOnPrevent form submission on invalid email

Block & allow lists

Add custom domain overrides in your widget settings:

  • Block list — Always block specific domains regardless of other checks. Useful for blocking competitor domains or known spam sources.
  • Allow list — Always allow specific domains even if they would normally be flagged. Useful for whitelisting your own internal test domains.

Enter one domain per line, e.g. spammer.com. Wildcards are not currently supported.

Custom error messages

Customise the error message shown to users. Go to your widget settings → "Error message" field. Available variables:

VariableReplaced with
{{reason}}Human-readable reason (e.g. "disposable email provider")
{{email}}The email address that was entered

Example: "Please use a real business email. {{reason}} are not accepted."

JavaScript API

For advanced use cases, MailGuard exposes a JavaScript API you can call directly:

JavaScript
// Listen for validation results
window.addEventListener('mailguard:result', (e) => {
  const { email, valid, reason, score } = e.detail;
  console.log(valid ? 'Email is good' : 'Blocked: ' + reason);
});

// Manually trigger validation on an input
window.MailGuard.validate('test@example.com').then(result => {
  console.log(result); // { valid: true, score: 92, reason: null }
});

Was this page helpful?