• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 666
  • Last Modified:

Mysql check column for invalid email

Hello,

I recently had a very nasty encounter sending newsletters, in wich one email had an invalid char ( ï ). this made the system act up and caused some spam to several ppl.

To avoid this for future mailings i was wondering if there is an easy way to make a function in mysql (phpmyadmin) to check a column if it contains an invalid email.

thnx
0
Th0R
Asked:
Th0R
1 Solution
 
HainKurtSr. System AnalystCommented:
maybe this

select * from emails where email REGEXP '[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}'
0
 
Th0RAuthor Commented:
Thanks, that will set me on the right track for sure !
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now