当我在邮件内容中添加样式和徽标时,邮件会变成垃圾邮件


Mail goes to spam when i add styles and logos in mail content

当我发送带有css和徽标的邮件时,我遇到了一个问题,每次邮件都会变成垃圾邮件,但当删除css和徽标时,它会在收件箱中正确发送。

下面是代码
$msgHtml=  "<div style='width:650px; font-family:Georgia,Arial, Helvetica, sans-serif; font-size:12px; color:#1f1f1f; background:#f9f9f9; border:1px solid #cfcfcf;'>
               <table width='650' border='0' cellspacing='0' cellpadding='4'>
               <tr>
                 <td colspan='4' align='left' valign='top' style='border-bottom:1px solid #cfcfcf;'>
                  <img  src='". base_url() ."assets/user/images/IPIX_logo_mail.jpg' alt='Emcon' alt='' /></td>
                 </tr>
               <td colspan='4'  style='height:25px; padding:0;'>
               <h3 style='font:bold 14px Georgia, Times New Roman, Times, serif ; color:#333; margin:4px 0 0 0; padding:5px 0px 5px 18px ;'>&nbsp;Hello <span style='font:bold 14px Arial, Helvetica, sans-serif; color:#222222;'>" .$fullname. "</span>,</h3>
               </td>
              </tr>
            <tr>
              <td colspan='4' style='height:8px; padding:0px ;margin:0px; border:none;'></td>
            </tr>
            <tr>
              <td colspan='4' style='font:normal 12px Arial, Helvetica, sans-serif; color:#444444; padding:4px 0px 4px 18px;'>&nbsp;Click the link below to reset your password</td>
            </tr>
             <tr>
             <td colspan='4' style='font:normal 12px Arial, Helvetica, sans-serif; color:#444444; padding:4px 0px 4px 18px;'>&nbsp;<a href='".base_url()."home/changeupasswd/".$userid."'>Click Here</a></td>
           </tr> 
              <tr>
                <td colspan='4' style='border:none; padding:8px 0 8px 20px; background:rgb(84, 215, 236); color:#fff; font-size:10px; line-height:20px; font:normal 12px Arial, Helvetica, sans-serif;'>© 2012 -13 emcon2013.com All Rights Reserved</td>
              </tr>
              </table>
            </div>";
          $sendto = $emailid;
            $from = "emailid@test.com";
            $subject = "Emcon : Reset password";
            $message = $msgHtml;
            $header = "From: " . $from . "'n";
            $header .= "Content-Type: text/html; charset=iso-8859-1'n";
            if (mail($sendto, $subject, $message, $header)) {
                echo 1;
            } else {
                echo 2;
            }

将这些添加到标题中以验证内容是否在html中

// To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "'r'n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "'r'n";