簡體   English   中英

發送格式化的電子郵件

[英]sending a formatted email

我想在某些事件上向我的用戶發送電子郵件,我想要格式化電子郵件。 我的意思是看起來像一個網頁。 一些格式化工作像字體,粗體,但像div背景顏色,字段集等休息不是。 怎么發送?

我們收到了收件箱中的促銷郵件

並非所有支持。 為了安全起見,您應該使用表格和內聯樣式完成所有操作。 以下是各種郵件客戶端支持和不支持的列表: http//www.campaignmonitor.com/css/

您也可以嘗試使用HTML重置模板,例如: http//htmlemailboilerplate.com/ ,它將修復一些問題(但當然不會添加功能)。

通常 - 內聯CSS適用於大多數電子郵件工具(Outlook,Gmail,...)。避免使用STYLE標記。 將IMG存儲在您的網站上並使用其完整路徑。

更多提示 - http://groundwire.org/labs/email-publishing/using-css-and-html-in-email-newsletters

有關更多提示,您需要顯示您嘗試過的內容。

不要使用div標簽

       <table><tr><td> tags

例如

     <table>
           <tr>
            <td style=" background-color:#FF00FF; ">do something </td>
            </tr>
      </table> 

編輯

         <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Your Title</title>

        </style>
        </head>

        <body>
        <table>
         <tr>
          <td style="background:url(test.png); width:200px; height:200px;">do something</td>
          </tr>
        </table>
        </body>
        </html>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM