<?php
$message = <<<EOD
<html><body>Dear {$firstName} {$lastName},
Sincerely,
Customer Service
EOD;
?>
With heredoc syntax there should be nothing except a new line after the opening identifier <<<EOD
not even whitespace and you want to wrap your variables in curly braces. The closing identifierEOD;
should have no whitespace before it and should be followed by a new line.