Can someone help me with the following problem, I'll be honest and say my PHP skills are a bit rusty, so any help would be appreciated.
I am trying to format an email sent using the mail() function.
I want the e-mail to look like this:
A message was submitted via http://www.mydomain.com.
Senders Name:
Senders Email:
Senders Message:
My problem is that having received the email the first line and the senders name merge together like:
The following message was submitted via http://www.mydomain.comSenders name:
How can I add a new line to format it the way I want?
CODE:
$msg = "The following message was submitted via http://www.mydomain.com";
$msg & vbcrlf .= "Senders name:\t$name\n";
$msg .= "Senders email:\t$email\n";
$msg .= "Message:\t$message\n";
$mailheaders = "From:\t$email\n";
mail("me@mydomain.com","Web Site Enquiry",$msg, $mailheaders);