- on local networks (LANs) you may not always have valid email addresses, e.g.
mine here are structured as user@host.local which are not valid and won't
pass validation check.
- for these rare cases you can bypass the regex check but be warned to NEVER
do this on a public server!!!
throw new Exception(DI::l10n()->t('Your email domain is not among those allowed on this site.'));
}
- if (!filter_var($email, FILTER_VALIDATE_EMAIL) || !Network::isEmailDomainValid($email)) {
+ if (DI::config()->get('system', 'only_valid_email_addresses', true) && (!filter_var($email, FILTER_VALIDATE_EMAIL) || !Network::isEmailDomainValid($email))) {
throw new Exception(DI::l10n()->t('Not a valid email address.'));
}
if (self::isNicknameBlocked($nickname)) {
foreach ($recipients as $recipient) {
$recipient = trim($recipient);
- if (!filter_var($recipient, FILTER_VALIDATE_EMAIL)) {
+ if (DI::config()->get('system', 'only_valid_email_addresses', true) && !filter_var($recipient, FILTER_VALIDATE_EMAIL)) {
DI::sysmsg()->addNotice(DI::l10n()->t('%s : Not a valid email address.', $recipient));
continue;
}
// xrd_timeout (Integer)
// Timeout in seconds for fetching the XRD links and other requests with an expected shorter timeout
'xrd_timeout' => 20,
+
+ // only_valid_email_addresses (Boolean)
+ // WARNING: You normally want to only accept valid email addreses. Under
+ // rare conditions this however can be a hinderence, e.g. on your LAN
+ // where you might have email addresses like user@domain.local which are
+ // surely not valid but still you need to signup to your testing instance
+ 'only_valid_email_addresses' => true,
],
'proxy' => [
// forwarded_for_headers (String)