<p>What is the most proper way to sending email of minimal 1000 or more in PHP? Any reliable email queuing technique that is capable to handle that?
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­</p>

[{'answer_id': 17617, 'author': 'mercutio', 'author_id': 1951, 'author_profile': 'https://Stackoverflow.com/users/1951', 'pm_score': 4, 'selected': True, 'text': '<p>You could just insert your emails into a Mail Queue database table, and have a separate process check the queue and batch send a certain number at once.</p>\n'}, {'answer_id': 17633, 'author': 'Matt Mitchell', 'author_id': 364, 'author_profile': 'https://Stackoverflow.com/users/364', 'pm_score': 0, 'selected': False, 'text': "<p>I've generally relied on a hack.\nI have a database list of email addresses and then use a meta-redirect to self with an increasing 'offset' parameter that specifies which row in the database I am up to. Server redirects cause problems because browsers assume that the time taken indicates an infinite loop.</p>\n"}, {'answer_id': 17676, 'author': 'JimmyJ', 'author_id': 2083, 'author_profile': 'https://Stackoverflow.com/users/2083', 'pm_score': 1, 'selected': False, 'text': '<p>as mercutio suggested, i would insert a new record into a mail queue table for each email waiting to be sent and then use a separate process (like a CRON) to check the table periodically for any queued items.</p>\n\n<p>if any emails are queued (and the email is not customised for each recipient) i would then group the emails by domain and send blocks together to reduce the total number of emails that have to be sent, i.e. if you have 1000 emails queued and 250 are to gmail accounts i would send the 250 in 25 blocks of 10 (remember to Bcc recipients to avoid them seeing each other).</p>\n\n<p>to actually send the mail i would use <a href="http://pear.php.net/package/Mail" rel="nofollow noreferrer">PEAR mail</a> over php\'s mail() function</p>\n\n<p>after sending the email either delete record(s) from the queue or change a status flag to show it was sent and loop - i would also add a counter to keep track of emails that failed to send and remove them after x failed attempts</p>\n\n<p>to overcome timeout issues i would either,(depending on the situation)\n - set the set_time_limit() to x seconds and keep track of the script execution time (killing the script after (x-1) seconds)\n - call the script from the command line to avoid timeouts\n - set a limit to the number of emails the script could send in one execution</p>\n'}, {'answer_id': 17680, 'author': 'Erik van Brakel', 'author_id': 909, 'author_profile': 'https://Stackoverflow.com/users/909', 'pm_score': 1, 'selected': False, 'text': "<p>Sure, the database table might be an idea. But what about sending 1000 e-mails with a 2mb attachment? you'd have to take that into account as well. I had the problem myself, and I eventually resorted to writing the e-mail to the database, and the files to the filesystem. The e-mail script I used then read the database records, and tried to fetch the attachments to send.</p>\n"}, {'answer_id': 17696, 'author': 'BlaM', 'author_id': 999, 'author_profile': 'https://Stackoverflow.com/users/999', 'pm_score': 2, 'selected': False, 'text': '<p>There\'s a tested solution for that: PEAR <a href="http://pear.php.net/package/Mail_Queue" rel="nofollow noreferrer">Mail_Queue</a></p>\n\n<p>Works fine for me.</p>\n'}, {'answer_id': 22440, 'author': 'rix0rrr', 'author_id': 2474, 'author_profile': 'https://Stackoverflow.com/users/2474', 'pm_score': 1, 'selected': False, 'text': "<p>Are you sure you need do this mail queuing yourself?</p>\n\n<p>Just deliver all mail to the local machine's mail transfer agent (sendmail...) and let that take care of the queuing and sending. After all, that's what was designed for.</p>\n\n<p>In other words: don't worry about it!</p>\n"}, {'answer_id': 59712732, 'author': 'Loren', 'author_id': 4500635, 'author_profile': 'https://Stackoverflow.com/users/4500635', 'pm_score': 1, 'selected': False, 'text': '<p>I created Emailqueue, which is a server that allows you to add emails to a queue so your app get relieved of the stress of the mailing, and also provides useful additional options, like the ability to program emails to be sent in the future, or setting per-email sending priorities. I think this might very well be what you\'re searching for.</p>\n\n<p>Emailqueue is available here: <a href="https://github.com/tin-cat/emailqueue" rel="nofollow noreferrer">https://github.com/tin-cat/emailqueue</a></p>\n\n<p>And there is also a Docker version that allows you to set up a working Emailqueue server in just a few minutes, here: <a href="https://github.com/tin-cat/emailqueue-docker" rel="nofollow noreferrer">https://github.com/tin-cat/emailqueue-docker</a></p>\n'}]
['https://Stackoverflow.com/questions/17609', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']