Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The host of the site I'm working on tends to shut off email if a certain number of fails take place. Needless to say this is a bit of a pain even if it's justified to fight spam. Is there a way to test if an email address has failed once so it can be flagged?

share|improve this question
is your website in HTML, PHP, or ASP.NET? – Brian McCarthy Apr 1 '11 at 14:17
@Brian: It's in PHP. Added a tag. – James Poulson Apr 2 '11 at 9:19
up vote 3 down vote accepted

Send an email to the address. If it bounces back it is turned off. To check that programatically you'll need to pipe the any replies to a script that then parses the reply looking for the rejection message. Then log it in a database as being a bad address.

share|improve this answer

+1 For John Conde, but also you could think about switching to an host who won't penalize you for this kind of problem. I understand it is Ok to fight spam, but blocking an e-mail account for a paying customer may not be the best way to achieve this, there are tons of host who won't act like this, or you could think about getting a private mail server?

share|improve this answer
+1 Hosting is such a commodity finding one without this draconian practice should be easy enough to do. – John Conde Apr 1 '11 at 13:10

A lot of sites send confirmation emails. In the email it will have a code or a url that the user will use to activate their account. Setting up your web app to do this isn't very difficult.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.