1.0.0 • Published 8 years ago
email-checker v1.0.0
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:
{
...
}
}
1.0.0
8 years ago