validate email and check the mail room is reachable
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`
},
)