samLar Posted August 12, 2010 Share Posted August 12, 2010 Hy guys, I'm using a simple php mail script but I have a tiny problem there - I might be already so overworked that I can't see it. Basically, the script work as it is but the body copy of the message does not come up as html text - basically it comes up with the code </br> and so on of ther php script. heders and everything else is on the right spot. The code I'm using is here: <?php $mail_formname = isset($_REQUEST['name'])?$_REQUEST['name']:''; // Optional $mail_formemail = isset($_REQUEST['email'])?$_REQUEST['email']:''; // Optional $mail_formnumber = isset($_REQUEST['number'])?$_REQUEST['number']:''; // Optional $mail_formmessage = isset($_REQUEST['message'])?$_REQUEST['message']:''; // Optional $mail_address = "contact@domain.com"; $headers = "MIME-Version: 1.0\r\n"; $headers = "Content-type: text/html; charset=iso-8859-1\r\n"; $mail_body = "You got a new message from:<br />" . "<br />Name: " . htmlentities($mail_formname) . "<br />Number: " . htmlentities($mail_formnumber) . "<br />Email: " . htmlentities($mail_formemail) . "And his message is the following:<br />" . "<br />Message: " . htmlentities($mail_formmessage) ; $mail_subject = "The subject"; $headers = "To: ". $mail_address ."\r\n"; $headers = "From: ". $mail_formemail ."\r\n"; if(!mail($mail_address, $mail_subject, $mail_body, $headers )){ exit(); } ?> and the image of an email I receive is attached (hope that works). Any help is really appreciated! [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
samLar Posted August 13, 2010 Author Share Posted August 13, 2010 Hey guys. No worries - I made a work around and found a much simpler one which does the same job here http://www.w3schools.com/PHP/php_mail.asp Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.