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

Laravel News:
Sending a daily email with Laravel and Campaign Monitor
Apr 12, 2018 @ 14:46:08

In a new tutorial on the Laravel News site, the author (Eric Barnes) shows you how to create a Laravel command that will send a daily email newsletter with the help of the Campaign Monitor service.

Here on Laravel News, we offer multiple ways of staying up to date with new content. Everything from auto-sharing to all the social media channels, a read-only Telegram channel, a weekly newsletter and last March we started offering a daily email digest.

To send the daily email we utilize the Laravel scheduler and Campaign Monitor so it’s completely automated. In this tutorial let’s look at how its all setup and how you can easily add this to your site to start sending out automated emails.

The tutorial starts by helping you get the Campaign Monitor SDK package installed (via Composer) and configured to use their API with your own key. Next it walks you through the creation of the console command to hook into the Scheduler for automated sending. It includes the code you'll need to find the data (in this case the latest blog posts) and the email method to send the information to the Campaign Monitor API. There's a brief mention of the creation of the HTML for the newsletter based on the Zurb Foundation and the configuration change to add the command to the scheduler for execution.

tagged: laravel tutorial command newsletter automation campaignmonitor api

Link: https://laravel-news.com/laravel-campaign-monitor


Trending Topics: