html - 如何在电子邮件中嵌入图像?

标签 html outlook html-email

我想发送带有 Logo 和 html 模板的邮件。我在这里添加了我的代码;

 <div style="max-width: 31.250em; background-color:#fcf9f2;margin:auto;font-family: 'Open Sans', serif;
    font-size: 13px;">
    <div class="row">
        <table border="0" width="100%" cellpadding="0" cellspacing="0" bgcolor="#e0e0e1">
            <tr>
                <td align="center">
            <tr>
                <td align="center">
                    <table border="0" align="center" width="50%" cellpadding="0" cellspacing="0"
                           class="container590">
                        <td height="50" style="line-height:55px;">
                            <a href=""
                               style=" border-style: none !important; border: 0 !important;"><img
                                    width="0.08em" height="40px" border="0"
                                    style="display:block; width: 170px;"
                                    src="https://www.yemeksepeti.com/assets/images/logo.png?v=1553756111693"
                                    alt="Yemek Sepeti"/></a>
                        </td>
                        </tr>
                    </table>
                </td>
            </tr>
            </td>
            </tr>
        </table>
    </div>
</tr>
    <div style="opacity: 0.9;margin-top:4.375em;margin-left: 3%;margin-right: 2%">
        <p>  %NameSurname%</p>
    </div>
    <div style="border-style: solid;border-top-width:1px;border-color:#c6c8ca;opacity: 0.9;margin-top:4.375em;margin-left: 3%;margin-right: 2%">
        <table>
            <tr>

                <td> %EMAIL%</td>
            </tr>
            <tr>
                <td style="text-align: initial"> %PASS%</td>
            </tr>

        </table>
    </div>

</br>

当我发送邮件时, Logo 没有出现,img 标签显示为blockingsrc。

我尝试将 base64 写入 src,但没有成功。

最佳答案

试试这个,也许你写错了。

<img src="data:img/jpg;base64, {{base-64 string}}" />

关于html - 如何在电子邮件中嵌入图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55476411/

相关文章:

html - html邮件中的中心图像

outlook - 使用自定义表单替换部分 Outlook 客户端窗口

html - 在电子邮件客户端中围绕超链接图像进行填充

excel - 从 Outlook 打开 Excel 时 VBA 只读

asp.net - 自动刷新图像(无 javascript、flash、silverlight)

css - 根据其值动态更改每个单元格的背景颜色

javascript - 在路径表面外绘制轮廓

html - Firefox 不显示图像,将乱码类名称分配给元素

javascript - 更新 iframe、历史记录和 URL。然后使用后退按钮使其工作

jquery - 需要 Benjamin 的一些关于 History.js 的解释