I ran just this function locally and it worked, but when I try to sign up on the production website, I get an Email invalid. error for an email that is registered using cloudflare e-mail forwarding.
|
func IsEmailValid(email string) bool { |
|
length := len(email) |
|
if length < 3 && length > 254 { |
|
return false |
|
} |
|
|
|
if !emailRegex.MatchString(email) { |
|
return false |
|
} |
|
|
|
parts := strings.Split(email, "@") |
|
mx, err := net.LookupMX(parts[1]) |
|
if err != nil || len(mx) == 0 { |
|
return false |
|
} |
|
|
|
return true |
|
} |
I ran just this function locally and it worked, but when I try to sign up on the production website, I get an
Email invalid.error for an email that is registered using cloudflare e-mail forwarding.meteor-server/pkg/core/utils.go
Lines 111 to 128 in 27e9fa4