Must be a well-formed email address error

Hi

Trying to create new external contact with PostExternalcontactsContactsAsyncWithHttpInfo() with value:

PersonalEmail : "xxxxxxxx.91.@gmail.com"

That results in Error

{"message":"The content you have sent contains 1 validation errors.","code":"validation.failed","status":422,"messageParams":{},"contextId":".....","details":[],"errors":[{"message":"must be a well-formed email address","code":"validation.failed","status":422,"messageParams":{},"details":[{"fieldName":"personalEmail"}],"errors":[]}]}

But when using all kinds of online email validation tools the email address is OK

PersonalEmail : "xxxxxxxx.91.@gmail.com" This failed my basic validation check. Is there an additional dot between 91 and @gmail ?

Gmail generally ignores dots. You can turn one address into thousands by littering the address with dots willy nilly and they all go to the same place and are equally valid.

1 Like
  1. This email address is an actual emailaddress in our system, instead of xxxxx part there is a basic username with basic characters.
  2. Yes there is a dot before @ sign in this emailaddress.
  3. I'm using .net System.Net.Mail as a email validator, example:

var emailAddress = new MailAddress(emailaddress);

This should throw exception if email address is not well formed.

  1. Dots don't matter in gmail, for example "xxxxx.91.@gmail.com" is the same as "xxxxx91@gmail.com"

So my question is just really how aggressive is the internal email validation in Genesys :slight_smile:

Having the addr-spec (user portion of the address) end with a period isn't valid per RFC5322 section 3.4.1. Because it's not a quoted string, it's a dot-atom. Dot-atoms use periods as a separator between segments, so therefore cannot end with a period.

You can try opening a case with Genesys Cloud Care to report this as a bug. It's not a valid address per my reading of the RFC, but if gmail allows it it's pretty pedantic for Genesys to enforce the RFC and block certain addresses that are allowed by common mail providers.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.