Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Freek Van der Herten:
How to send a "trial expiring soon" mail in Laravel Spark
Jan 15, 2018 @ 16:10:02

Freek Van der Herten has posted a guide to sending an email in a Larvel Spark-based system to remind a user that their trial of a service is expiring soon. In this case, it's a monitoring service he offers called Oh Deal.

I'm currently building a webapp named Laravel Spark, a Laravel based template to kick off SaaS projects. It offers logic for organising users into teams, handles trial periods, subscriptions, payments, invoices and much more.

[...] Unfortunately, Spark will not send out a mail to team owners whose teams are in trial periods that will soon expire. Luckily it's easy to add that yourself. I'll show you how to do just that in this post. Along the way, you'll learn some good general tips for sending out emails in batches. Let's get started!

He then starts in on the code, showing first how to locate the teams that should be sent the email. He adds a new field to track when the email was sent and the code required to send the actual email. He shows how to make the command restartable, create the "Mailable" class and the command to send the actual email.

tagged: team tutorial ohdear ending trial spark laravel mail email

Link: https://murze.be/how-to-send-a-trial-expiring-soon-mail-in-laravel-spark


Trending Topics: