PHPMailer is a full featured email transfer class for PHP that exposes a much greater range of features than the standard PHP mail() function.
Firstly, download PHPMailer from here and extract it into your desired location.
Go to the extracted folder and copy following files to your web server root directory:
Adjust the example below for your needs. Make sure you assigned values to the following variables:
Create a file called smtp2go.php under the root folder of your web server with this content:
Test the smtp2go.php page using browser and see if the email is sent successfully. We recommend that the SMTP Username and SMTP Password are stored outside the root folder of the web server.
Please note: if you experience “timeouts” or problems connecting due to an unreliable internet connection, consider increasing the max_execution_time setting in the php.ini file on your server, to a value such as 120 (instead of the default value 30).
Try SMTP2GO free for as long as you like:Try SMTP2GO Free → Paid plans available for over 1,000 emails/month.