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

TutsPlus.com:
Send Emails in PHP Using the Swift Mailer
Jun 12, 2018 @ 18:18:59

On the TutsPlus.com site, they've posted a new tutorial showing you how to use one of the more popular (and longest running) mailer projects in PHP: Swift Mailer. In this tutorial they introduce you to the tool and share some code showing it in use to send basic emails.

In this article, we're going to explore the Swift Mailer library that allows you to send emails from PHP applications. Starting with installation and configuration, we'll go through a real-world example that demonstrates various aspects of sending emails using the Swift Mailer library.

The article starts with a brief introduction to the Swift Mailer library and what kinds of features it brings to the table. It then shows the installation via Composer and how to include it into your application (autoloaded, naturally). Code is then provided showing how to send emails and includes examples of sending BCCs, attachments, setting the "from" and setting the body contents. It steps you through each part of this sample code and explains what it is doing and other options it could include.

tagged: tutorial send email swiftmailer introduction package composer

Link: https://code.tutsplus.com/tutorials/send-emails-in-php-using-the-swift-mailer--cms-31218


Trending Topics: