Skip to content
Advertisement

How to schedule an email at a specific date and time, with the gmail api?

I want to ask if anyone knows how to schedule an email with the gmail API. I am using laravel 8. What I need is, for example, to schedule an email to be sent on a specific day and at a specific time. I already have the function to send mail normally but now I also need the function to schedule a send. I appreciate if someone can help me, indicate an example or function of the gmail api for this. Thanks. This is my function in the laravel controller:

JavaScript

Advertisement

Answer

I think that you are looking for a Queue/Worker/Jobs, Laravel implements it out of the box, you can check it here.

Remember that to process your queue you must have a second php artisan process running in your server to handle the queue, you could also use services like redis to process it.

Hope it helps you =)

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement