Solved

Mysql check column for invalid email

Posted on 2012-04-11
2
647 Views
Last Modified: 2012-06-27
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
Comment
Question by:Th0R
2 Comments
 
LVL 51

Accepted Solution

by:
HainKurt earned 500 total points
ID: 37835656
maybe this

select * from emails where email REGEXP '[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}'
0
 

Author Closing Comment

by:Th0R
ID: 37973021
Thanks, that will set me on the right track for sure !
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question