Skip to content

Email address validator written in golang supporting domain check

License

Notifications You must be signed in to change notification settings

tewwwfik/emailChecker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Email Checker

Email address validator for golang. Can make lexical validation and test whether domain exists.

It can both checks single or multiple emails.

Usage

Multiple mails:

emails := []string{
		"[email protected]  ",
		"bad-example@ There Is No Domain Like That.com",
		"bad-example",
		"[email protected]",
	}
        //Returns validmails,lexicalInvalidMails and domainInvalidMails as string slice
	validmails, lexicalInvalidMails, domainInvalidMails := GetValidEmails(emails)

Single Mail:

//It returns corrected string without empty space

//mail string, lexical boolean, domain boolean
mail, lexical, domain := CheckSingleEmail("abidik Gubidik@ whatThe Fuck.com")

You can inspect example.go for more instructions and usage.

License: MIT