Notification e-mail address for new user registrations is invalid, when it's too long

Hey folks,

at first, thanks for ConcreteCMS - it is a stable, feature-rich and easy to use, CMS!

It seems, there is a issue / bug:

In backend at System & Settings → Registration → Account options:

Notifications: Send e-mail notification, when new user registered

When I enter an e-mail address with < 30 characters it is working, but with 31 or more characters, there’s an error message: “Invalid e-mail-address”

It seems that the field is too short for long domains or e-mail-adresses.

Using ConcreteCMS 9.4.4 - latest version.

Is there a possibility to fix this at form validation, PHP or database level (field too short)?

Best regards,
si.lithium

That settings is not stored in the database: it’s stored in the Concrete configuration files and it can be as long as you want.

Where can I find that setting? I don’t see it in any /config files. I do see “EMAIL_MAX_LENGTH = 254” in

”\concrete\vendor\egulias\email-validator\src\Egulias\EmailValidatorEmailParser.php”

but nothing that limits things to 30 characters. BUT I have 1% of the knowledge of the code base that @mlocati has so I’m here to learn also. LOL

It’s set by the controller:

My feable brain still can’t see where to alter the maximum length of the email address BUT I also can’t replicate the problem. I have several notification email addresses that are over 30 characters long and they save properly.

There’s no such maximum length in the core.
The email addresses are saved in a PHP file without any length limit:

The only check performed is that we call the email validator for every email address specified:

Thank you very much for your quick investigations, help and responses!

I will check the files you mentioned this evening - maybe there is a correlation with the German language pack? We use ConcreteCMS with German language in front- and backend.

Best regards
si.lithium

Ok, I have to correct my first message.

I tried a few things - it seems, that there is a kind of domain validation, if the domain exists?
There is no correlation of the length, sorry for that, I thought, because our second-level domain is a bit long.

I can tell you, the domain, we use, exists (DENIC registered and reachable) but it is not indexed at any search engine like Google at the moment… Maybe this is the issue?

Ya see, I was thoroughly confused when you said “it’s stored in the Concrete configuration files and it can be as long as you want.” LOL

Yes the testMXrecord thing might need to be looked at. Are there situations where an MX test would fail yet still be a deliverable email address?

Sorry for making so much noise for a self-produced error!

Yes, the missing MX record for that domain was the root cause!
Domain and website and are still fresh and the MX DNS-Record was missing, after adding MX record the notification e-mail is successfully saved!

E-Mail was working, so I did not notice.

Thank you very much for your effort and help!

Best regards,
si.lithium

1 Like

So perhaps a more robust error message when the testMXrecord thing fails might have saved everyone some time and frustration.

1 Like