Using this php script, you can send email using SMTP PHPMailer Library. Set the configuration as below and you are good to go.
In the repository there is a file named template_design.html. Open the file and edit it as you want to your desired html design. A sample design is already added here.
Open the file "sendMail.php". You will find some fields that you need to fill up with your own SMTP Configuration.
You can set the sender and receiver dynamically using php variables or you can use static one. You can also set this on "sendMail.php"
On the same "sendMail.php" file, you will see a section $message. This will contain the whole HTML template that you designed. You can use static email template or use dynamic values to HTML using PHP Script. Just set the PHP variable as below if you need to set values dynamically.
Once everything is set, run the "sendMail.php". You will get success message if email is sennt successfully and also the error message if it fails.
PHPMailer - A full-featured email creation and transfer class for PHP is owned by PHPMailer. This software is distributed under the LGPL 2.1 license, along with the GPL Cooperation Commitment. Please read LICENSE for information on the software availability and distribution.
The code in this repository, including all code samples in the notebooks listed above, is released under the MIT license. Read more at the Open Source Initiative.



