Any decent web application has to communicate with users on multiple levels. Simply displaying information is not enough, web apps should also be able to send emails, SMS messages, and more, to ensure good user engagement.

The PHP Mailer is a full-featured email creation and transfer class for PHP. It is an open-source library — available on Github — that is easy to install and even easier to use. We can use it in a web application to easily send out emails using a configured SMTP server.

This article walks through the steps for using the PHP Mailer to send emails using AWS SES, as well as Gmail.

Installation

Let’s start with the installation. You should have a  XAMPP or  LAMP installed on your server.

With this in place, create a new folder project in the PHP scripts folder (/var/www/html/) or (C:/xampp/htdocs). Let’s call this folder “email”. You can install the PHP Mailer module inside this folder.

#phpmailer #php-development #php #lamp

How to Send Emails with the PHP Mailer
4.90 GEEK