Jump to content
thirty bees forum

How to check for email format when a user signs up in our store?


Recommended Posts

Posted

My question is related to the registration form that the user sees when it's going to register an account in our store.

I would like TB, to disallow the registration process, if the user enters an email address that is not valid.

Example:

  • Allow registration
    • <...>@outlook.com
    • <...>@hotmail.com
    • <...>@protonmail.com
  • Deny registration
    • <...>@outloo.com
    • <...>@hotmeil.com
    • <...>@test.mail
    • <...>@gmail.com

Thank you!

Posted (edited)
1 hour ago, the.rampage.rado said:

Do you have a list of all registered domains everywhere in the world?

No, but I can allow registration only for certain providers, to avoid conflicts.

For example, I want my clients to be registered only with the following providers:
- Outlook/Hotmail, Gmail, Yahoo, ProtonMail

If the email entered does not match one of the above (...@<provider>.<ext>), notify that to the user and prevent it from creating an account.

It could make things easier when using a single email sender service.

Also, I would like the new customer to receive an email with its credentials, and some more information on first registration. Also, for newsletters (auto). If the email entered is not correct or does not exist, the system will fail to do that tasks. Maybe you didn't take that into account for your store?

Edited by MaxStrax
Posted
15 hours ago, MaxStrax said:

I think, I got it.

I must check out the validate.php class.

Validate::isValidEmail is called very often, in many contexts. Changing it is not a good idea.

If you indeed have a need to validate email addresses, you can use hook actionBeforeSubmitAccount and do your validation there.

I personally think it is not a good idea, as you will loose sales. 

Note that there are third party api that you can use to validate email addresses. For example, mailgun verification service works very nicely.  They do a lot of tests - check that domain exists, test that MX records for domain exists, check that recipient email server is accepting connections. And apart from this, they have their own huge database of 'alive' emails, because their service send millions/billions emails monthly and they process result/bounce responses/etc.

Still, I use this service to validate emails in my marketing list only. I don't care if address for transactional emails are invalid, I send the email anyway. 

If my customers don't want to tell me their real email address, they should be allowed to do so. As long as they complete the purchase, I'm happy. They won't be able to retrieve forgotten password, and they will not receive order processing emails, but why should I care.

  • Like 1
Posted

Spam is plentiful on all kind of pages nowadays.
On some sites its even better to get rid of the contact form altogether.

On 7/27/2023 at 9:25 AM, MaxStrax said:

I would like TB, to disallow the registration process, if the user enters an email address that is not valid.

Offer other mediums, like Whatsapp, Telegram, Signal.  How many sign ups we are talking about and what is the nature of the doubtful mail addresses?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...