Skip to content

Commit

Permalink
Fix for PHPMailer#1361
Browse files Browse the repository at this point in the history
  • Loading branch information
Synchro committed Mar 21, 2018
1 parent d7a4bab commit 4fd6207
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/contactform.phps
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
* This example shows how to handle a simple contact form.
*/

//Import PHPMailer classes into the global namespace
use PHPMailer\PHPMailer\PHPMailer;

$msg = '';
//Don't run this unless we're handling a form submission
if (array_key_exists('email', $_POST)) {
date_default_timezone_set('Etc/UTC');

require '../PHPMailerAutoload.php';
require '../vendor/autoload.php';

//Create a new PHPMailer instance
$mail = new PHPMailer;
Expand Down

0 comments on commit 4fd6207

Please sign in to comment.