Jump to content

Recommended Posts

I already have a method of sending hundreds of emails by creating a db que that a cron runs every so often.  My question is, is there a better way or a way at all to run a php script just once and be able to send hundreds of emails?  I run my site on a dedicated server, so I have complete control of it.  I would imagine that php would timeout when trying to send that much info. 

 

I would be sending a mixture of some emails over smtp and some straight from my server depending on the domain the email is going to. Basically anything going to a microsoft address flows through a gmail smtp to ensure it delivers to an inbox and not a spambox, everything else goes out of my mail host on my server.

 

I use phpmailer for all email sending.  Since all these emails are being sent based on certain db conditions in table data, I am making a que table that a cron runs to gather the according IDs and saves those.  Then another script/cron runs that actually sends the emails, which then marks the que table as sent as it goes for each ID.  I do it this way cause the que table could possibly gather more IDs in a run than the sending script is set to actually send.  So the sending cron runs X times more than the que cron.  Now maybe trying to send more emails in a single shot is pointless when I have all this cron doing it for me anyway, but I an tired of making 2 separate scripts, crons and tables to achieve a single goal for each automatic email I want to send.

 

Please don't suggest a email sending service as I have already looked at that option and at least as of today I have not found one that allows me to submit a chunk of data for them to send.  All places I talked to make you have a customer list, blah blah blah.  I only want to do this with my server, not a mail service.

 

Any suggestions? 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.