isValidEmail

Checks whether a given email is valid or not.

bool
isValidEmail
(
string email
,
bool checkDns = false
,
EmailStatusCode errorLevel = EmailStatusCode.none
)

Parameters

email string

The email to validate.

checkDns bool

Boolean determining whether it should check dns for validation.

errorLevel EmailStatusCode

The error level boundary.

Return Value

Type: bool

True if the email is valid according to the given configurations, false otherwise.

Meta

Standards

RFC 5321 RFC 5322