How to Schedule Emails in PHP - Run Automated Scripts Using CRON - Full PHP 8 Tutorial

preview_player
Показать описание
In this lesson, we learn how to queue emails in database & send them automatically using cron jobs.

SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL
👍 Smash the like button
🤝 Subscribe to the channel & turn the notifications on
💬 Post comments, any feedback is greatly appreciated
THANK YOU!

🛠️ TOOLS & SERVICES I USE

COURSE PLAYLIST

RESOURCES

** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you.
Рекомендации по теме
Комментарии
Автор

This is my first ever comment. What you do here is absolute game changer practical knowledge, that you are giving to us for free! These topics Are really great and I have never seen them before. Thank you!!

petrjenicek
Автор

Great master Gio im happy because you are back ❤️🌹

abdallakaram
Автор

To know the path doesn't mean to go through the path. And 12 years of experience Gio has will not bestow upon me on the 4th day of watching these tutorials. I am in maternity leave since 2015 and have read a lot, need some tasks. A bit overwhelmed to read in the Linkedin that Gio was consulting on Java, PHP and C++ at the same time in college. Great channel.

ЕкатеринаПолчанова-дя
Автор

I love this playlist, this is beyond great
you are a legend for me in the field of web development 🌟

omaryahia
Автор

I'am glad to be the first one this time. Saying - another great content is just not enough. Its much more than that. Please keep on going. 😀

constantinci
Автор

Incredible content! Sorry that I didn't find you earlier! subscribed. 🥰

arun.sekher
Автор

Great lesson again, Gio.

Some minor points about the github repo of this lesson...

1. I had to puzzle somewhat to get the github code (branch 3.14) started since when I started it broke on the InvoiceService class, that still calls the now non-existing EmailService->send method.

I see that in branch 3.15 the InvoiceService class is removed, solving the break there. But just taking the github branch and goint to localhost:8000 was a bit confusing at the start and it took me some time to find out where it what to do.

In the end just commenting the line was sufficient, since it was not really part of this lesson.


2. As of the previous lesson the .env-example file no longer is complete, since MAILER_DSN was added to the environment variables.

3. Perhaps it would be nice, when you add tables or table contents as a startposition, to add the sql for that somewhere, so the student that want to follow the examples can be sure about having a secure starting position?

I have taken the result from you screen, and got it working, but having an exact reference for comparison be nice.



Al in all, just some minor points, that are solvable for students that have followed you so far. But you tend to be complete in your material, so I thought to give it back.

You don't say it here, but I found out that when you start this script "in the terminal" that you mean a bash terminal in a docker app? container. When I went there it seemed to work, but it wasn't my first try to get there. Normally I just use git bash for commands, but of course that doesn't work when you need a db connection using host=db.

Ah well, so we learn. 🙂

Thanks again

hansschuijff
Автор

Thank you so much, I am still in the first section and I will continue to watch your playlist and the whole practice, I hope there is a greater part of practical examples to do so that more is understood♥️🙏🏻

saad_alnefai
Автор

I absolutely enjoyed this. It's incredible that you showed us this. I had fun with it as I created the database and now found a way to access my database from my text/code editor. Thanks alot for this Gio

Zubbee
Автор

Hi Gio, I'm back here. So glad I have this to watch again. But I have a question. I would like to create a record on a table at specific times of the day throughout everyday. Would you recommend using crontab or are there perhaps are other more efficient ways? Thanks in anticipation

Zubbee
Автор

Just in case you wonder how the CRON container could read the script file in the PHP container, the CRON container actually had a copy of those files when he created the volumes for this container, as you can see at 14:28.

DonatoBencosme
Автор

This would've been such a CRONic pain trying to figure out without Gio. I did have a slight issue with imports because this project has Email model and uses Email class from Symfony\Component\Mime\Email but I got it to work in the end.

benderbg
Автор

Hi Gio, thank you for this course. I got a problem and is that the status doesn't get updated even though i did it just like you

themaridv
Автор

Thanks a lot Gio!
Can we use this for sending newsletter for a small project, like a blog?!

Nooneandeveryone
Автор

Hi, are there any async options in PHP? Like async functions in js for example?

aleksandrkanygin
Автор

Would this work In older version of PHP?

gracetang
Автор

How can i setup cron on xampp my system can't run docker
What i need to install

DigitaSkills
Автор

For some reason the cron job does not work for me!

pinedahenryandres
join shbcf.ru