First off, I'm on a short deadline. Help would be appreciated
I'm building a website, and it includes a php message form. After being filled out, it sends the message to my email address.
Here is the PHP snippet:
<?php
$mailTo = '[email protected]';
$name = htmlspecialchars($_POST['Name']);
$mailFrom = htmlspecialchars($_POST['Email']);
$subject = 'Message from your site';
$message_text = htmlspecialchars($_POST['Message']);
$message = 'From: '.$name.'Email: '.$mailFrom.'Message: '.$message_text;
mail($mailTo, $subject, $message);
?>
The PROBLEM however...is that the messages come to my email looking like this....
From: Jayson WilliamsEmail: [email protected]: blah.
As you can see, its a bit difficult to read. How do Insert line breaks so that when the email comes in, it will look more or less like this:
From: Jayson Williams
Email: [email protected]
Message: blah.
Help please...will award points!
I'm building a website, and it includes a php message form. After being filled out, it sends the message to my email address.
Here is the PHP snippet:
<?php
$mailTo = '[email protected]';
$name = htmlspecialchars($_POST['Name']);
$mailFrom = htmlspecialchars($_POST['Email']);
$subject = 'Message from your site';
$message_text = htmlspecialchars($_POST['Message']);
$message = 'From: '.$name.'Email: '.$mailFrom.'Message: '.$message_text;
mail($mailTo, $subject, $message);
?>
The PROBLEM however...is that the messages come to my email looking like this....
From: Jayson WilliamsEmail: [email protected]: blah.
As you can see, its a bit difficult to read. How do Insert line breaks so that when the email comes in, it will look more or less like this:
From: Jayson Williams
Email: [email protected]
Message: blah.
Help please...will award points!