附件混乱HTML电子邮件模板

时间:2015-06-16 14:51:14

标签: html css email attachment email-attachments

我在创建的HTML电子邮件模板上遇到了一些麻烦。 代码的某些东西可能不对。

这是代码:

<!DOCTYPE HTML>
<HTML>
<HEAD>
<STYLE>

</STYLE>
<meta http-equiv = "Content-Type" content = "text/html; charset = iso-8859-1">

</HEAD>
<BODY style = "background:#EBEBEB;">


<table border="0" cellpadding="2" width="800" align="center">
    <tr>

    <td width="790">

    <div style = "position: absolute; width: 768px; height: 1136px;">


    <div style = "position: absolute; width: 90%; top: 0%; bottom: 0%; margin: 5%; left: 0px; background-color: #FFFFFF; border-radius: 3px; box-shadow: 0px 0px 5px #888888;">

        <!--Logo-->
        <div style = "padding-top: 1%;" align = "center"><img src = "imglink" width="170" height="84"/></div>

        <div class="body-content" id="body-content" style="line-height:27px;">
            <div>
                <font color="#404040" face="HelveticaNeue-Light, Times, serif" style="font-size:17px; text-align:left;">
                    <span contenteditable="true" apple-content-name="body" style="display:block; width:90%; margin: 5%; left: 0px;">
                        Duis nonsequ ismodol oreetuer et dolore facidunt, vulluptat volore consecte dolesed dolor velit adionse magnisc se illandi gniamet, vendre feum veniamc onullutpatin ipit wisi dolesting.
                        Duis nonsequ ismodol oreetuer et dolore facidunt, vulluptat volore consecte dolesed dolor velit adionse magnisc se illandi gniamet, vendre feum veniamc onullutpatin ipit wisi dolesting.
                        Duis nonsequ ismodol oreetuer et dolore facidunt, vulluptat volore consecte dolesed dolor velit adionse magnisc se illandi gniamet, vendre feum veniamc onullutpatin ipit wisi dolesting.
                        Duis nonsequ ismodol oreetuer et dolore facidunt, vulluptat volore consecte dolesed dolor velit adionse magnisc se illandi gniamet, vendre feum veniamc onullutpatin ipit wisi dolesting.
                        Duis nonsequ ismodol oreetuer et dolore facidunt, vulluptat volore consecte dolesed dolor velit adionse magnisc se illandi gniamet, vendre feum veniamc onullutpatin ipit wisi dolesting.
                        Duis nonsequ ismodol oreetuer et dolore facidunt, vulluptat volore consecte dolesed dolor velit adionse magnisc se illandi gniamet, vendre feum veniamc onullutpatin ipit wisi dolesting.
                        Duis nonsequ ismodol oreetuer et dolore facidunt, vulluptat volore consecte dolesed dolor velit adionse magnisc se illandi gniamet, vendre feum veniamc onullutpatin ipit wisi dolesting.
                        Duis nonsequ ismodol oreetuer et dolore facidunt, vulluptat volore consecte dolesed dolor velit adionse magnisc se illandi gniamet, vendre feum veniamc onullutpatin ipit wisi dolesting.
                        Duis nonsequ ismodol oreetuer et dolore facidunt, vulluptat volore consecte dolesed dolor velit adionse magnisc se illandi gniamet, vendre feum veniamc onullutpatin ipit wisi dolesting.
                    </span>
                </font>
            </div>
        </div>
    </div>

</div> 

    </td>
    </tr>
</table>


</BODY>
</HTML>

实际上将文件附件添加到内容字段中工作正常,它与文本对齐并且没有可见的问题。 在发送电子邮件并在同一客户端(Mac OS X上的电子邮件)上接收后,整个事情看起来被破坏,文本也以某种方式被覆盖。 我对HTML网页设计的理解可能还不足以知道那里发生了什么,请帮忙。

This is the unsend email, everything fine

发送之前的电子邮件。 (附件位于(内容)文本字段的底部

This is the received Email 收到后它不是原产地形状。

1 个答案:

答案 0 :(得分:0)

您可以尝试从标签开始:

<messaging:emailTemplate subject="FUN {!relatedTo.FUN_BC__c}-{!relatedTo.Name}" recipientType="Contact" relatedToType="BC__c" >

<messaging:attachment renderAs="pdf" filename="{!relatedTo.Name}.pdf"> </messaging:attachment>  </messaging:emailTemplate>