Skip to content

onisaint/validate-email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Validate Email

validate email and check the mail room is reachable

How to use

isEmail to validate email for correctness

import { isEmail } from '@onisaint/validate-email'

isEmail(
    "[email protected]",
    {
        hostWhiteList: [], // (optional) returns true for any of the domains
        hostBlackList: [], // (optional) returns false, and takes priority over whitelist
        ignoreMaxLength: false, // (optional) do-not validate long emails
    },
)

isEmailReachable checks if the domains mail servers are reachable

import { isEmailReachable } from '@onisaint/validate-email'

isEmailReachable(
    "[email protected]",
    {
        skipValidityTest: false // (optional) checks for email correctness using `isEmail`
    },
)

About

checks if the email is reachable

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published