【问题标题】:gmail not load external css for send email templates [closed]gmail不加载用于发送电子邮件模板的外部css [关闭]
【发布时间】:2014-12-08 02:09:59
【问题描述】:

我需要使用 phpmailer 类和 html 电子邮件模板发送邮件。 php mailer 发送成功的电子邮件模板,但在 gmail 中我看不到模板。我认为 gmail 没有加载外部 css。

模板HERE

我的问题是什么?如何解决这个问题并在 gmail 中显示完整的模板?!

【问题讨论】:

    标签: php css email gmail


    【解决方案1】:

    Gmail 预处理器会在<head></body> 内容之后剪切所有内容。

    您所要做的就是内联移动样式,您可以使用以下免费工具:

    希望有帮助。

    【讨论】:

      【解决方案2】:

      虽然您在技术上可以链接到电子邮件中的外部样式表,但任何受人尊敬的电子邮件提供商都会阻止外部样式表。您需要内联执行它们。

      【讨论】:

        【解决方案3】:
        <?php
        $query=mysql_query(select * from table_name)
        $table="";
        
        $table .="<table border='1'  style='background-color:#C0C0C0;' >
            <tr>
             <th bgcolor='#E6E6FA'>Agent Name</th>
             <th bgcolor='#E6E6FA'>Count of  VOICE - Agent Name</th>
             <th bgcolor='#E6E6FA'>Average of Total Time</th>
             </tr>";
        while($row=mysql_fetch_array($query))
            {
        
                  $table .="<tr>";
                  $table .= "<td>" . $row['agent_name'] . "</td>";
                  $table .= "<td>" . $row['name_count'] . "</td>";
                  $table .= "<td>" . $row['total_aht'] . "</td>";
              }
               $table .="</tr>";
                 $table .= "<tr><td bgcolor='#E6E6FA'>Total</td><td bgcolor='#E6E6FA'>$y</td>
        $to = "abc@gmail.com";
        $subject="hii";
        $headers = "MIME-Version: 1.0" . "\r\n";
        $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
        $headers .= "From:<abc@gmail.com>" . "\r\n";
        $mail=mail($to,$subject, $table,$headers);
            ?>
        

        【讨论】:

          猜你喜欢
          • 2013-04-25
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2013-01-13
          • 1970-01-01
          相关资源
          最近更新 更多