Updated regex pattern to allow longer TLDs

dependabot/npm_and_yarn/json5-1.0.2
Glenn Wilkinson 2022-12-16 17:04:55 +00:00 committed by GitHub
parent 2d08befb6b
commit d2efb18ef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ func (s *SMTP) Validate() error {
// validateFromAddress validates // validateFromAddress validates
func validateFromAddress(email string) bool { func validateFromAddress(email string) bool {
r, _ := regexp.Compile("^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$") r, _ := regexp.Compile("^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,18})$")
return r.MatchString(email) return r.MatchString(email)
} }