In of part 4 of Building a simple contact form in PHP we added a CAPCHA field to help reduce spam. In this part we are going to change the sending of the mail to use SMTP by using Swift Mailer, a php mailing library. As we left it our contact form looked like this. Add the SMTP credentials to your configuration file I am using a gmail account as an example. Change the server, port, username, and password to whatever the settings for your email account are. Adding the Swiftmailer library Head…