Welcome Guest, Not a member yet? Register   Sign In
[solved] Delay in ajax response time
#6

(This post was last modified: 10-22-2017, 11:03 PM by skunkbad. Edit Reason: note regarding frequency of cron )

I use a mail queue for all my websites. It's really an essential thing. As long as you have access to cron:

1) Instead of sending the email, put it in a database table with one field "sent" set to 0;
2) Use cron to check for email that hasn't been sent, send it, then update the "sent" field to 1; (I have cron check for unsent email once per minute)

This type of behavior has a lot of advantages. For one, you can always check if mail is going out. Also, it's really easy to resend email just by marking "sent" as 0 again. There is 0 email sending lag time, because it's being put in a queue.
Reply


Messages In This Thread
RE: Delay in ajax response time - by InsiteFX - 10-22-2017, 03:22 AM
RE: Delay in ajax response time - by wolfgang1983 - 10-22-2017, 09:57 PM
RE: Delay in ajax response time - by wolfgang1983 - 10-22-2017, 04:01 PM
RE: Delay in ajax response time - by skunkbad - 10-22-2017, 11:02 PM
RE: Delay in ajax response time - by wolfgang1983 - 10-22-2017, 11:28 PM
RE: Delay in ajax response time - by skunkbad - 10-23-2017, 04:32 PM
RE: Delay in ajax response time - by wolfgang1983 - 10-24-2017, 03:50 AM
RE: Delay in ajax response time - by InsiteFX - 10-23-2017, 08:52 AM
RE: Delay in ajax response time - by wolfgang1983 - 10-23-2017, 11:50 AM
RE: Delay in ajax response time - by wolfgang1983 - 10-24-2017, 03:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB