HTML email in Gmail - CSS style attribute removed

前端 未结 6 1487
慢半拍i
慢半拍i 2020-12-05 10:31

I\'m working on an HTML email and I am using MailChimp\'s Responsive Email Templates in combination with their CSS inliner tool. For the most part, the email looks great acr

6条回答
  •  情深已故
    2020-12-05 11:00

    Just thought I'd add this in to the mix. I encountered as this problem as well and when looking at the raw source I realized that the 8-bit encoding was splitting lines in odd places due to the 1000 character limit, so I was ending up with content like this:

    734 340 9795 
    

    Solution is to base64 encode the content and use chunk split or whatever tools you have to accomplish the same.

    In php I did $html = chunk_split(base64_encode($html)) and then set Content-Transfer-Encoding: base64. Now gmail loves me.

提交回复
热议问题