Basically I have a form on my page and when an user fills it and sends, the code for it to be sent to me is (PHP):
$webmater = myemail@mail.com;
$from = $user_name;
$body = "Name: $user_name \n".
"E-mail: $user_email \n".
"Subject: $user_subject \n".
"Message: $user_message \n";
$headers = 'From: '.$from.' <'.$user_email.'>' . "\r\n" . 'Reply-To: ' . $user_email;
mail($server, $user_subject, $body, $headers);
Is there a way to insert a page inside the $body? Like:
$body = "<html>Lalalala.......</html>";
I actually tried it, but the page ends up sending me all the code I built. Basically I don’t want that ‘crappy’ info text to be sent to the e-mail. I want it with a certain design. Is it possible?
Just add the HTML content type to the headers:
Read this nice article: Sending Nice HTML Email with PHP.