<?php
require_once 'message.php';
$from_address = 'johndoe@example.com';
$from_name = 'John Doe';
$to_address = 'janedoe@example.com';
$to_name = 'Jane Doe';
$subject = 'How to use PHPMailer';
$body = 'The Murach PHP and MySQL book has a chapter on how to use PHPMailer
<a href="https://github.com/PHPMailer/PHPMailer">PHPMailer</a> to send email.'; $is_body_html = true;
try {
send_email($to_address, $to_name, $from_address, $from_name, $subject, $body, $is_body_html);
echo("Mail was sent successfully.&;t/br />>");
} catch (Exception $e) {
echo("Error " . $e->getMessage() . "<br />>");
}
?>