email-checker

Check emails for typos, verify syntax and whether the domain has an MX record.

Usage no npm install needed!

<script type="module">
  import emailChecker from 'https://cdn.skypack.dev/email-checker';
</script>

README

email-checker

Check emails for typos, verify syntax and whether the domain has an MX record.

Install

npm install @mhingston/email-checker

Import (Common JS)

const EmailCheck = require('email-checker').default;

Import (ES2015)

import EmailCheck from 'email-checker';

Usage

EmailCheck.mxCheck(email: string, options:? any): Promise<boolean>

You can also optionally pass in a configuration object.

EmailCheck.spellCheck(email: string, options:? any): Promise<string>

You can also optionally pass in a configuration object.

EmailCheck.syntaxCheck(email: string): boolean

Finally, the following will perform all 3 of the above.

EmailCheck.check(email: string, options:? any): Promise<any>

The optional options object should be formatted as follows:

{
    dnscache:
    {
        ...
    },
    mailCheck:
    {
        ...
    }

}