<?php
function sendPlainEmail($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 = "
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.
";
$body = wordwrap($body, 70); // truncate the line length as per php.net mail() documentation
mail($to, $subject, $body); // email sent from server to registered user
}
?>