<?php
function sendHTMLEmail($arg1, $arg2){ // pass any variables to include as an argument ex
// build email subject and body. Variables passed as arguments are used to populate email body with user registration details. Header is from php.ini file on server
$to = $arg1;
$subject = $arg2;
$body = "<html><body>";
$body .= "<p style="color:#BADA55; font-size: 16px;">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce ut dictum nunc. Cras blandit nibh eget lorem dignissim malesuada. In sagittis ac ipsum ac rhoncus.
Morbi iaculis, elit eu lacinia maximus, dolor lorem eleifend eros, a feugiat ligula nisi ac purus. Phasellus nec ultrices tortor. Proin vel dui id erat finibus
convallis eu ac odio. Pellentesque accumsan finibus dolor, at vulputate sem tempor et.
------------------
Variable 1: $arg1
Variable 2: $arg2
------------------
Donec tincidunt efficitur venenatis. Mauris mauris ipsum, dapibus malesuada ipsum sed, hendrerit accumsan dui. Sed id elit sapien. Nulla efficitur hendrerit diam,
ac malesuada lectus ultricies at.</p>
";
$body .= "</body></html>";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Create email headers
$headers .= 'From: '.$from."\r\n".
'Reply-To: '.$from."\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $body, $headers); // email sent from server to registered user
}
?>