Answer the question
In order to leave comments, you need to log in
How to send email notifications correctly?
Hello!
There is a small affiliate program in which almost every action provides for E-mail notification, starting with registration.
Now, after each action, there is a call to the function that forms the body of the letter and sends it via third-party SMTP, the problem is that there is a visible delay at the moment of sending and in my opinion this should not happen, how do E-mail notifications work in your projects?
So far, only one thought came to my mind - to save the letter in the database, write a script that will be launched by CRON (every minute?) And scan the database for unsent letters, well, send them in turn through the same function ...
- how much is it right? Never had to work with a large number of notifications before...
Answer the question
In order to leave comments, you need to log in
When you need to control the process through the database
id status (0 wait,1 success ,2 work ) attemt
, you can execute tasks through cron, then you need to follow the queue yourself
The answer option above saves us from this thanks to a bunch of settings.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question