views:

161

answers:

1

I have a list of email addresses, which I tested that they are invalid, not exists. But my mail server still keep trying to send email to them.

Is there any way to stop sending email to the non-exists, invalid email addresses?

I am using php though..

+3  A: 

I'm not sure exactly what you are asking. If you want a way to validate email addresses before sending, I'm afraid you're going to be disappointed. It's essentially impossible to define a valid email address - even if you go to extreme lengths to pattern match email address syntax and keep up to date on all the valid top-level domain names, you still haven't accounted for email address which are in a valid format but do not have a mailbox assigned to them (or even are just not monitored).

If you're looking for how to remove bouncing-but-retrying emails from your mail servers queue, you should specify what mailserver you are using.

If you want to know more about the PHP mail command, as per Chell's answer, the documentation is a good place to start

Colin Pickard
OK, your comment clears it up - you need the second of my answers - talk to the person who runs the mail server, and if that person is you, read the documentation on the mail server
Colin Pickard
And if you're stuck on operation of the mailserver, try posting a question to http://www.serverfault.com, StackOverflow's sister site for admin questions
Colin Pickard