I'm trying to modify a Craft CMS plugin to slightly customise the email output of a contact form script. I have very limited PHP skills and so far the answers I've found online haven't worked for me in this case. The relevant portion of the script is below:
$email->body = "From: " . $message->fromName . " (" . $message->fromEmail . ")" . $message->message;
I would like to add a double line break after the "fromEmail" in parenthesis so that the "message" starts below rather than on the same line. The script currently outputs "fromName", "fromEmail", and "message" all on the same line.
I've tried various ways of adding \n\n or "\n\n" and keep getting PHP errors - it may just be a syntax problem. Could someone please help?
plain text email:
$email->body = "From: " . $message->fromName . " (" . $message->fromEmail . ")\n\n" . $message->message;
HTML email:
$email->body = "From: " . $message->fromName . " (" . $message->fromEmail . ")<br><br>" . $message->message;