L
L
Lev Rozanov2017-03-10 09:59:31
PHP
Lev Rozanov, 2017-03-10 09:59:31

How to send an email on a specific date?

Good day!

Please help.
There is a database table in which records are entered: -
name
- date of notification
- email for notification Thank you in advance!


Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Burov, 2017-03-10
@MetisKot

Add another processed boolean field,

SELECT * FROM queue WHERE date < now() AND processed = false;
Before sending the letter, change processed to true.
Well, run this script once a day/hour/minute.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question