I have the following code below which is pulling a template and information to send an email from some PHP code that I did not write. However I need to try and get it working. I'm really basic when it comes to coding so any help would be appreciated. Thank you!
$fh = fopen('templates/customer.eml','r');
$emailContents = fread($fh, filesize('templates/customer.eml'));
$emailContents = str_replace(":name:", $person->first . " " . $person->last, $emailContents);
$emailContents = str_replace(":meeting_name:", $meeting->name, $emailContents);
$emailContents = str_replace(":chair:", $chair->first . " " . $chair->last, $emailContents);
fclose($fh);
$header = "FROM: vra@vodafone.com\r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .="Content-type: text/html; charset: utf8\r\n";
mail($person->email , "Meeting Request", $emailContents, $header);
echo $person->email;