php - Cannot send table format to gmail using PHPmailer. -


i used msghtml() function send mail body. ishtml enabled in mailer script. html tags
rendered in mail, inline style worked. table not rendered in gmail. inbox showing plain text. images displayed clearly.

php code

$pd_details.='   <table >    <th>prod no  |</th>  <th>prod name   |</th> <th>prod price   |</th> <th>prod quantity   |</th> <th>prod image   |</th>       <tr><td>'.$c.'</td><td>'.$pname.'</td><td>'.$total.'</td><td>'.$quant.'</td<td>'.$pdimg.'</td></tr> </table>  total price : '.$sum.' '; 

try this...                    $from='sender details';                   $to='receiver email address';                   $headers .= 'mime-version: 1.0' . "\r\n";                   $headers .= 'content-type: text/html; charset=iso-8859-1' . "\r\n";                   $headers .= 'from:'.$from. "\r\n";                    $body='<table >        <th>prod no  |</th>  <th>prod name   |</th> <th>prod price   |</th> <th>prod quantity   |</th> <th>prod image   |</th>           <tr><td>'.$c.'</td><td>'.$pname.'</td><td>'.$total.'</td><td>'.$quant.'</td<td>'.$pdimg.'</td></tr>     </table>';                    $subject="subject";                   ini_set("sendmail_from",$from);                   @mail($to,$subject,$body,$headers);   

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -