html - sending mail using php with a proper format -


i send mail registered form in site using php. mail sent successfully. mail showing html codes. not shows like:

name : xxxxxx age  : 24 email: example@example.com 

may know how sending mail above. current coding using below:

<?php $solvation = "<html>" . $_post['solvation']; $name = $_post['name']; $to = $_post['email']; $msg = $_post['message']; $message = '<!doctype html><html>' .   '<head>' .   '<meta http-equiv="content-type" content="text/html">' .   '<title>email notification</title>' .   '</head>' .   '<body>' .   '<div id="outer" style="width: 80%;margin: 0 auto;margin-top: 10px;">' .   '<div id="inner" style="width: 78%;margin: 0 auto;background-color: #fff;font-family: open sans,arial,sans-serif;font-size: 13px;font-weight: normal;line-height: 1.4em;color: #444;margin-top: 10px;">' .   '<p> solvation        :' . $solvation . '</p>' .   '<p> name         :' . $name . '</p>' .   '<p> email            :' . $email . '</p>' .   '<p> message      :' . $msg . '</p>' .   '</div>' .   '</div>' .   '<div id="footer" style="width: 80%;height: 40px;margin: 0 auto;text-align: center;padding: 10px;font-family: verdena;background-color: #e2e2e2;">' .   '</div>' .   '</body>' .   '</html>'; //$headers   = $solvation."\n".$name."\n".$email."\n".$message."\n"; $headers = 'from: garunkumar41@gmail.com' . "\r\n" . 'reply-to: garunkumar41@gmail.com' . "\r\n"; $headers .= "mime-version: 1.0\r\n"; $headers .= "content-type: text/html; charset=iso-8859-1\r\n"; mail($solvation, $name, $to, $message, $headers); ?> 

i want send email above.. can help?

try this: change $solvation , $message below

$solvation = $_post['solvation'];      $message   = '<!doctype html><html>                                 <head>                                 <meta http-equiv="content-type" content="text/html">                                 <title>email notification</title>                                 </head>                                 <body>                                 <div id="outer" style="width: 80%;margin: 0 auto;margin-top: 10px;">                                 <div id="inner" style="width: 78%;margin: 0 auto;background-color: #fff;font-family: open sans,arial,sans-serif;font-size: 13px;font-weight: normal;line-height: 1.4em;color: #444;margin-top: 10px;">                                 <p> solvation      :'.$solvation.'</p>                                  <p> name           :'.$name.'</p>                                 <p> email          :'.$email.'</p>                                 <p> message        :'.$msg.'</p>                                 </div>                                   </div>                                 <div id="footer" style="width: 80%;height: 40px;margin: 0 auto;text-align: center;padding: 10px;font-family: verdena;background-color: #e2e2e2;">                                </div>                                 </body>                                  </html>'; 

edit: try changing

this

$headers .= "mime-version: 1.0\r\n"; $headers .= "content-type: text/html; charset=iso-8859-1\r\n"; 

to

$headers = 'mime-version: 1.0' . "\r\n"; $headers .= 'content-type: text/html; charset=iso-8859-1' . "\r\n"; 

also check whether have defined $email in php code


Comments