MailGuard Configuration
MailGuardLast updated July 2026
Widget settings
Go to MailGuard → Manage Widgets and click a widget to configure it.
| Setting | Default | Description |
|---|---|---|
| Block disposable | On | Block throwaway email providers |
| Block invalid MX | On | Block domains with no mail server records |
| Block undeliverable | On | Block mailboxes that fail SMTP check |
| Block free providers | Off | Block Gmail, Yahoo, Hotmail, Outlook etc. |
| Block role emails | Off | Block info@, admin@, noreply@, support@ etc. |
| Show inline error | On | Show error message below the input field |
| Block form submit | On | Prevent 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:
| Variable | Replaced 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?