@arndesk/emailexists
A NodeJS library for checking if an email address exists without sending any email.
Get Started • Installation • Usage • Features • Contributing • License
Get Started
Installation
Use npm
to install this package:
npm install @arndesk/emailexists
Usage
Here's a basic example of how to use qed-mail in your code:
const { validateEmail } = require('@arndesk/emailexists');
// Async function to use the validateEmail function
async function main() {
const sender = null; //Not Important to set anything
const recipient = 'recipient@example.com';
const checkValid = true; // If false, then only check Format and MX Records
try {
const result = await validateEmail(sender, recipient, checkValid);
console.log(result);
} catch (error) {
console.error(error);
}
}
main();
Features
- Validates the format of an email address
- Checks the MX records of the email domain
- Performs further validity checks depending on the user's requirements
- Can be used both as a standalone library or as a part of a larger project