You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
Is there a way to modify what is accepted as a proper format for email address TLD's? For example, nowadays one can register a domain such as johndoe@bigapple.coffee
When initially setting up the account apparently had no issues with this but anytime we try to modify anything in the customer's account it errors because of the email address format. We have already tried to change the address but it errors out unless we modify the record directly in Raw Admin.
Offline
Take a look at {private}/core/CORE_Mail/CORE_Mail.php. In there, there is a check_address() function that is giving the .coffee TLD an issue (because it's six letters long). In that function, there is a regex:
if (!(preg_match('/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$/',$address))) {
Change that to:
if (!(preg_match('/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z])$/',$address))) {
And see if that helps. That will get PEAR to check the address, which might also be a problem.
Offline
Hello Nick,
We made the change and getting the same error when updating user account...
The following fields, which must validate as email addresses, were submitted in an invalid format. Check for special characters or spaces: Email Address
Error when attempting change email function....
The email address you entered is invalid. Please try again.
Anything else we can check??
Thanks
Last edited by polarize (09-15-2019 19:01:04)
Offline
Is this problem related to
https://forum.kryptronic.com/viewtopic.php?id=33843
Offline
Good Morning Nick,
yes the email is in format user@domain.coffee
I had to change the file back this morning because the change also caused us to have issues with Wal-Mart Marketplace emails....
format: user@relay.walmart.com
Any ideas??
Offline
zanart wrote:
Is this problem related to
https://forum.kryptronic.com/viewtopic.php?id=33843
Yes.
Offline
polarize wrote:
Good Morning Nick,
yes the email is in format user@domain.coffee
I had to change the file back this morning because the change also caused us to have issues with Wal-Mart Marketplace emails....
format: user@relay.walmart.com
Any ideas??
Interesting on this affecting the walmart emails. I'm looking into it further.
Offline
My workaround for the time being is making changes through Raw Database Admin for this type of email tld which doesn't seem to be causing any issues. After changing back to the default code wal-mart emails are working again.
Offline
We are still having trouble with email addresses that have formats such as "user@domain.coffee". I needed to update a customer's account and cannot change his email to this format that he needs to receive email confirmations. I modified the code in CORE_mail.php from...
if (!(preg_match('/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$/',$address))) {
to
if (!(preg_match('/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z])$/',$address))) {
It still doesn't allow me to change the email address.
Offline
It doesn't seem to make any difference what we change the code number range to an error appears while attempting to change the email in Change User Account Email Address. Is there something else in the code that checks for an appropriately formatted email address?
error: The email address you entered is invalid. Please try again.
I currently have the original file back in place for now. Thanks
Offline
Here is the code we tried to use...
if (!(preg_match('/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z] {2,10})$/',$address))) {
Offline
That did it! The small details LOL
Thank you Nick
Offline