B
B
Benderm2019-06-03 11:26:29
Yii
Benderm, 2019-06-03 11:26:29

What is the best way to implement sending emails with a delay of a couple of hours?

Hello!
At me now a task to send letters to the client, with a delay in 1-2 hours. Those. the client left a request on the site, and a letter about this request should come to the operator after a fixed period of time. What is better to use for this? Maybe a queue server?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton, 2019-06-03
@Eridani

We enter it into the database after the fact, write the time in a timestamp, write the status sent \ not sent, go through the records by cron comparing the time from the request and from the current one, check the sending status, if everything goes according to the conditions - change the status of the record, send it to the operator.

S
Stimulate, 2019-06-03
@Stimulate

Cron

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question