Advanced Node.js email validation library with RFC 5321 compliance, WHOIS lookup, domain typo suggestions, name detection, batch processing, and TypeScript support for enterprise applications.
Full compliance with RFC 5321 email validation standards for maximum accuracy
Real-time domain MX record validation and SMTP connection testing with automatic retry
Extract first and last names from email addresses with confidence scoring
Smart domain suggestions with 70-95% confidence for misspelled domains
Domain age verification and registration status checking with 1-hour caching
Identify disposable, free, and role-based emails with custom detection methods
npm install @devmehq/email-validator-jsyarn add @devmehq/email-validator-jsimport { verifyEmail } from '@devmehq/email-validator-js';
const result = await verifyEmail({
emailAddress: 'user@example.com',
verifyMx: true,
verifySmtp: true,
timeout: 3000
});
console.log(result);
// {
// validFormat: true,
// validMx: true,
// validSmtp: true
// }import { verifyEmailBatch, verifyEmailDetailed } from '@devmehq/email-validator-js';
// Batch verification for multiple emails
const emails = [
'valid@example.com',
'invalid@fake-domain.xyz',
'disposable@tempmail.com',
'user@gmail.com'
];
// Parallel batch processing
const results = await verifyEmailBatch({
emails: emails,
verifyMx: true,
verifySmtp: true,
concurrency: 5 // Process 5 emails simultaneously
});
console.log(results);
// Returns array of validation results for each email
// Detailed verification with error codes
const detailed = await verifyEmailDetailed({
emailAddress: 'user@example.com',
verifyMx: true,
verifySmtp: true,
timeout: 5000
});
console.log(detailed.errorCode); // Specific error code for debugging
console.log(detailed.errorMessage); // Human-readable error messageimport { verifyEmail, extractNameFromEmail, suggestDomainCorrection, getWhoisInfo } from '@devmehq/email-validator-js';
// Use advanced features like name detection and domain suggestions
const advancedValidation = async (email: string) => {
// Extract name from email with confidence score
const nameInfo = extractNameFromEmail(email);
console.log(`Name detected: ${nameInfo.firstName} ${nameInfo.lastName} (confidence: ${nameInfo.confidence})`);
// Get domain typo suggestions if misspelled
const suggestion = await suggestDomainCorrection(email);
if (suggestion.suggestedDomain) {
console.log(`Did you mean ${suggestion.suggestedDomain}? (confidence: ${suggestion.confidence}%)`);
}
// Check domain age and registration with WHOIS
const domainInfo = await getWhoisInfo(email.split('@')[1]);
console.log(`Domain age: ${domainInfo.age} days`);
console.log(`Registration status: ${domainInfo.status}`);
// Full validation with all checks
const result = await verifyEmail({
emailAddress: email,
verifyMx: true,
verifySmtp: true,
checkDisposable: true,
checkFree: true,
timeout: 3000
});
return {
valid: result.valid,
name: nameInfo,
suggestion: suggestion.suggestedDomain,
domainInfo: domainInfo,
details: result
};
};// Complete form validation with UI feedback
const EmailValidationForm = () => {
const [email, setEmail] = useState('');
const [validation, setValidation] = useState(null);
const [loading, setLoading] = useState(false);
const validateEmail = async () => {
setLoading(true);
try {
const detailed = await verifyEmailDetailed({
emailAddress: email,
verifyMx: true,
verifySmtp: true
});
setValidation({
valid: detailed.validFormat && detailed.validMx,
format: detailed.validFormat,
mx: detailed.validMx,
smtp: detailed.validSmtp,
errorCode: detailed.errorCode,
errorMessage: detailed.errorMessage
});
} catch (error) {
setValidation({
valid: false,
errorMessage: error.message
});
}
setLoading(false);
};
return (
<div className="email-validator">
<input
type="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
placeholder="Enter email to validate"
/>
<button onClick={validateEmail} disabled={loading}>
{loading ? 'Validating...' : 'Validate Email'}
</button>
{validation && (
<div className="results">
{validation.valid ? (
<div className="success">
✅ Valid Email
<p>Format: {validation.format ? '✓' : '✗'}</p>
<p>MX: {validation.mx ? '✓' : '✗'}</p>
<p>SMTP: {validation.smtp ? '✓' : '✗'}</p>
</div>
) : (
<div className="error">
❌ Invalid Email
{validation.errorMessage && (
<p>Error: {validation.errorMessage}</p>
)}
{validation.errorCode && (
<p>Code: {validation.errorCode}</p>
)}
</div>
)}
</div>
)}
</div>
);
};Improve email campaign delivery rates by up to 95%
Protect signup forms from spam and fake registrations
Reduce bounce rates in marketing automation platforms
Enhance marketing IP reputation with clean email lists
Validate bulk email lists with concurrent batch processing
Prevent disposable emails in subscription services
Ensure data quality in CRM and customer databases
Optimize transactional email deliverability
Comply with email marketing best practices
Save costs by removing invalid emails before sending
Delivery rate improvement
Domain suggestion accuracy
WHOIS cache TTL
Batch processing
Main validation function that performs comprehensive email verification.
Options:
emailAddress: string - Email to validateverifyMx: boolean - Check MX records (default: true)verifySmtp: boolean - Check SMTP connection (default: false)timeout: number - Connection timeout in ms (default: 10000)Advanced verification with detailed error codes and messages for debugging.
Concurrent batch email verification with configurable parallelism.
Extract first and last names from email addresses with confidence scoring.
Suggest corrections for misspelled domains with 70-95% confidence levels.
Get domain age and registration status through WHOIS lookup with 1-hour caching.
Check if email address is from a disposable/temporary email provider.
Check if email address is from a free email provider (Gmail, Yahoo, etc.).
Choose the perfect plan for your validation needs. All plans include full API access, TypeScript support, and regular updates.
Perfect for small businesses and MVPs
For growing companies with higher volume
For large-scale applications
Perpetual license for a single product - no recurring fees
one-time payment
This library is distributed under the Business Source License (BSL) 1.1. You can use it freely for:
Questions about licensing? Contact us at sales@email-check.app