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
mlocati
September 17, 2025, 3:09pm
2
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.
mhawke
September 17, 2025, 9:21pm
3
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
mlocati
September 17, 2025, 9:33pm
4
It’s set by the controller:
}
$config = $this->app->make(Repository::class);
$config->save('concrete.user.registration.enabled', $registrationType !== 'disabled');
$config->save('concrete.user.registration.type', $registrationType);
if ($registrationType !== 'disabled') {
$config->save('concrete.user.registration.validate_email', $registrationType === 'validate_email');
$config->save('concrete.user.registration.notification', $registerNotification);
if ($registerNotification) {
$config->save('concrete.user.registration.notification_email', implode(',', $registerNotificationEmails));
}
}
$config->save('concrete.user.registration.email_registration', (bool) $post->get('email_as_username'));
$config->save('concrete.user.registration.display_username_field', (bool) $this->get('display_username_field'));
$config->save('concrete.user.registration.display_confirm_password_field', (bool) $post->get('display_confirm_password_field'));
$config->save('concrete.user.registration.captcha', (bool) $post->get('enable_registration_captcha'));
$config->save('concrete.user.edit_profile.display_username_field', (bool) $this->get('display_username_field_on_edit'));
$this->flash('success', t('Registration settings have been saved.'));
mhawke
September 18, 2025, 12:09am
5
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.
mlocati
September 18, 2025, 8:05am
6
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:
if ($registrationType !== null && $registrationType !== 'disabled') {
$registerNotification = (bool) $post->get('register_notification');
if ($registerNotification) {
$emailValidator = $this->app->make(EmailValidator::class, ['testMXRecord' => true]);
$registerNotificationEmails = array_unique(preg_split('/\s*,\s*/', $post->get('register_notification_email', ''), -1, PREG_SPLIT_NO_EMPTY));
if ($registerNotificationEmails === []) {
$this->error->add(t('No notification recipient specified.'));
} else {
foreach ($registerNotificationEmails as $registerNotificationEmail) {
$emailValidator->isValid($registerNotificationEmail, $this->error);
}
}
}
}
if ($this->error->has()) {
return $this->view();
}
$config = $this->app->make(Repository::class);
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?
mhawke
September 18, 2025, 1:44pm
9
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
mhawke
September 18, 2025, 6:04pm
11
So perhaps a more robust error message when the testMXrecord thing fails might have saved everyone some time and frustration.
1 Like