简体   繁体   English

如何使用 Sendgrid 在 Outlook 中呈现模板?

[英]How can I have a template render in Outlook with Sendgrid?

I create a mail template with sendGrid for @hotmail.com account but when I test the email I don't have the same template as designed.我使用 sendGrid 为@hotmail.com 帐户创建了一个邮件模板,但是当我测试电子邮件时,我没有与设计的模板相同的模板。 This is what I did:这就是我所做的: 我去了

The result is:结果是: 我得到了什么

My HTML code:我的 HTML 代码:

<td colspan="5" style="border-left: 20px solid pink;border-right: 20px pink solid ;padding : 0 30px; font-size:13px; padding-bottom : 20px">
    <div style="margin-top:20px; display : flex; font-size : 12px">
        <div style="background: pink; flex: 1; margin-right: 5px; width : 130px; height : 50px; text-align : center">
            <p style="margin : 0; margin-top : 10px">TEST</p>
            <p style="margin : 0">TEST</p>
        </div>
        <div style="width : 130px; height : 50px; text-align : center; background: pink; flex: 1; margin-right: 5px;">
            <p style="margin : 0; margin-top : 10px">TEST</p>
            <p style="margin : 0">TEST</p>
        </div>
        <div style="width : 240px; height : 50px; text-align : center; background: pink; flex: 2;line-height:50px;">
            TEST TEST TEST TEST TEST TEST TEST
        </div>
    </div>
</td>

Email software is quite backward.电子邮件软件相当落后。 You'll find flex is not supported widely: https://www.caniemail.com/search/?s=flex你会发现 flex 没有得到广泛支持: https : //www.caniemail.com/search/?s= flex

The basic structure of an email should still be (unfortunately) table-based using the default display (ie don't change it to flex).电子邮件的基本结构仍应(不幸的是)使用默认显示(即不要将其更改为 flex)基于表格。 Look up 'hybrid email' approach for the table structure.查找表结构的“混合电子邮件”方法。

Furthermore, for long tables to display properly in mobiles, you'll need to keep in mind a rough 320 pixels maximum width, so the width:240px parameters are not great.此外,为了在手机中正确显示长表格,您需要记住粗略的 320 像素最大宽度,因此width:240px参数不是很好。 Best to work in percentages, or re-work the table.最好按百分比计算,或重新计算表格。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM