How can i send email to 50,000 customers on one shot?


I want to send email to 50,000 members in one shots by using PHP.
Could you please let me know how can this possible?

Is there any other alternative then please suggest.

Thank You

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

i would suggest you to create a console application. that would execute a batch sending of email.
Like kerwinsiy said, do it from the console. PHP is not designed for such a task and will most likely time-out before all the email is sent.

I'd either do it via a shell script or create a distribution list on whatever email server you're using and use php to send to that 1 address and let the smtp server do all the work translating that into the 50 recipients and sending.
make sure :

1. you send it to either each person separately or you use BCC not TO otherwise everyone will see everyones email address and this really annoys people.

2. make sure you have permission to mail these people.  Some countries now use 'opt in' and the person has to agree to receive the emails.  

If you are sure you want to use php (why ?  Its like using a motor cycle to get from your kitchen to your bedroom in the same house)
then you will need to do it in multiple runs.  Have a list of email addresses and call the php file.  Run on a certain number of addresses maybe 30.  Email those people and then call the same page with a paramter like 'count=30' and then start processing the list at item 31.
GurbirsAuthor Commented:
PHP is not compulsory, If you will suggest some better way then I will try to do in that way.
The main problem is with mail server. Mail server can not allow to send email to 50,000 persons in one shots.

But I want to send email to all members at same time.

So please suggest best solution what I need to do?

Email servers often do not let you send to that many people to stop spam.

First get the info on how many you can send.  
Is there a limit on the number per email ?
Is there a limit per hour ?  per day ?

Then batch your emails to fit into this.

If you are restricted too much by the mail server then sign up with a different mail server or talk to a mail shot company that will email this out for you to your list (at a cost).

Oh and please make sure all these people want your email.  The restrictions on emails have been put in for a reason.  lets stop SPAM.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.