html – Sending Birthday Emails Based on MySQL Query


I have to create a function (task) on my website's server that sends a birthday email, containing an HTML code, to birthday emails.

Detail: these birthdays are registered in a MySQL table that contains name, email and date of birth. Therefore, if there are names in this table whose day and month are the same as today's date, send the birthday email to those names.

Therefore, the task would be to integrate with MySQL and send these emails depending on the result of the query (day and month equal to the current date, send an email. Otherwise, don't send).

How can I do this?


Guys, I found the solution by doing a task and creating a page on my server.

When the page is accessed, the email is sent. And the task for him to open the browser on this page will always happen at 9 am. That way the page is automated!

Thanks for your answers anyway.

Scroll to Top