<?php

require('assets/phpmailer2/PHPMailer Pro.php');

$mail = new codeworxtech\PHPMailer Pro();

try {

  $mail->SetSender( ["name@yourdomain.com" => "First Last" ] );
  $mail->AddRecipient( ["whoto@otherdomain.com" => "John Doe" ] );
  $mail->AddBCC( ["whogetsBCC@yourdomain.com" => "First Last" ] );

  $mail->Subject     = "PHPMailer Pro Test Subject via sendmail, advanced";
  $mail->MessageHTML = $_SERVER['DOCUMENT_ROOT'] . "/phpmailer2/data/contents.html";
  $mail->MessageText = "To view the message, please use an HTML compatible email viewer!";

  $mail->AddAttachment($_SERVER['DOCUMENT_ROOT'] . "/phpmailer2/data/phpmailer2.gif");
  $mail->AddAttachment($_SERVER['DOCUMENT_ROOT'] . "/phpmailer2/data/phpmailer2_mini.gif");

} catch (Exception $e) {
  echo $e->errorMessage();
}
?>
