Kryptronic Software Support Forum

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.

#1 08-20-2019 23:40:16

polarize
Member
Registered: 11-15-2004
Posts: 287

Email Address Format

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.


Using Kryptronic K9! smile
Previous Versions:
ClickCartPro 8
ClickCartPro 7
ClickCartPro 6
ClickCartPro 5.1

Offline

 

#2 08-21-2019 08:33:05

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19717
Website

Re: Email Address Format

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:

Code:

if (!(preg_match('/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$/',$address))) {

Change that to:

Code:

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.


Nick Hendler

Offline

 

#3 09-15-2019 19:00:15

polarize
Member
Registered: 11-15-2004
Posts: 287

Re: Email Address Format

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)


Using Kryptronic K9! smile
Previous Versions:
ClickCartPro 8
ClickCartPro 7
ClickCartPro 6
ClickCartPro 5.1

Offline

 

#4 09-16-2019 08:46:10

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19717
Website

Re: Email Address Format

I verified you made the change correctly.  Is the address you're trying to add in the format 'user@domain.coffee'?


Nick Hendler

Offline

 

#5 09-16-2019 10:13:49

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1679

Re: Email Address Format


- Euorpacart 8

Online

 

#6 09-16-2019 17:59:53

polarize
Member
Registered: 11-15-2004
Posts: 287

Re: Email Address Format

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??


Using Kryptronic K9! smile
Previous Versions:
ClickCartPro 8
ClickCartPro 7
ClickCartPro 6
ClickCartPro 5.1

Offline

 

#7 09-17-2019 09:11:23

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19717
Website

Re: Email Address Format

zanart wrote:

Is this problem related to
https://forum.kryptronic.com/viewtopic.php?id=33843

Yes.


Nick Hendler

Offline

 

#8 09-17-2019 09:11:50

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19717
Website

Re: Email Address Format

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.


Nick Hendler

Offline

 

#9 09-18-2019 22:39:36

polarize
Member
Registered: 11-15-2004
Posts: 287

Re: Email Address Format

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.


Using Kryptronic K9! smile
Previous Versions:
ClickCartPro 8
ClickCartPro 7
ClickCartPro 6
ClickCartPro 5.1

Offline

 

#10 02-08-2021 16:32:49

polarize
Member
Registered: 11-15-2004
Posts: 287

Re: Email Address Format

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...

Code:

if (!(preg_match('/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$/',$address))) {

to

Code:

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.


Using Kryptronic K9! smile
Previous Versions:
ClickCartPro 8
ClickCartPro 7
ClickCartPro 6
ClickCartPro 5.1

Offline

 

#11 02-09-2021 09:36:31

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19717
Website

Re: Email Address Format

.coffee is 6 characters long, so instead of {2,5}, use {2,6} or make it future-proof by using {2,10}.


Nick Hendler

Offline

 

#12 02-22-2021 20:12:44

polarize
Member
Registered: 11-15-2004
Posts: 287

Re: Email Address Format

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


Using Kryptronic K9! smile
Previous Versions:
ClickCartPro 8
ClickCartPro 7
ClickCartPro 6
ClickCartPro 5.1

Offline

 

#13 02-22-2021 20:16:03

polarize
Member
Registered: 11-15-2004
Posts: 287

Re: Email Address Format

Here is the code we tried to use...

Code:

if (!(preg_match('/^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z] {2,10})$/',$address))) {

Using Kryptronic K9! smile
Previous Versions:
ClickCartPro 8
ClickCartPro 7
ClickCartPro 6
ClickCartPro 5.1

Offline

 

#14 02-23-2021 09:59:23

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19717
Website

Re: Email Address Format

You have a space before {2,10}.  Remove it.


Nick Hendler

Offline

 

#15 02-24-2021 19:21:12

polarize
Member
Registered: 11-15-2004
Posts: 287

Re: Email Address Format

That did it! The small details LOL

Thank you Nick smile


Using Kryptronic K9! smile
Previous Versions:
ClickCartPro 8
ClickCartPro 7
ClickCartPro 6
ClickCartPro 5.1

Offline

 

Board footer