Arif
Arif

Reputation: 1211

PHP Mail_Queue. How it really works?

Let suppose I send an email to 30,000 users and put a number 250 in my queue list. Will it stop sending email if I close my browser window OR i just need to run the page once? And what if the server down in the middle of email sending?

Upvotes: 1

Views: 58

Answers (1)

Joshua Kissoon
Joshua Kissoon

Reputation: 3309

Well there are many cases, I'll try to go through them all.

Will it stop sending email if I close my browser window?

No it will not stop sending if you close the browser window once the request is sent, since your server would have already received the request and would be processing the data.

It will only stop if the server needs constant input from the user/browser, which isn't needed in your case since the users are already in the queue list.

What if server is down?

If the server is down in the middle of mail sending, the unsent mail will be sent later when the server is back up since Mail_Queue would have stored the queue in some form of persistent storage.

The mails will of course not be sent if the server crashes and the file/database with the Mail_queue is lost.

Upvotes: 1

Related Questions