Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Email 在电子邮件中添加页脚文本的最佳方式是什么?_Email_Outlook_Footer_Mime_Mime Mail - Fatal编程技术网

Email 在电子邮件中添加页脚文本的最佳方式是什么?

Email 在电子邮件中添加页脚文本的最佳方式是什么?,email,outlook,footer,mime,mime-mail,Email,Outlook,Footer,Mime,Mime Mail,我的目标是修改MIME内容并在电子邮件中添加页脚注释,而不改变其行为 如果电子邮件内容类型为text/plain,则我将电子邮件内容类型更新为multipart/mixed,如下所示: Content-Type: multipart/mixed; Boundary="--=_SAMPLE_MIME_BOUNDARY_" email original data ----=_SAMPLE_MIME_BOUNDARY_ Content-Type: text/plain; Content-Trans

我的目标是修改MIME内容并在电子邮件中添加页脚注释,而不改变其行为

如果电子邮件内容类型为text/plain,则我将电子邮件内容类型更新为multipart/mixed,如下所示:

Content-Type: multipart/mixed;
Boundary="--=_SAMPLE_MIME_BOUNDARY_"

email original data

----=_SAMPLE_MIME_BOUNDARY_
Content-Type: text/plain;
Content-Transfer-Encoding: 7bit

!-- Sample footer note --!
----=_SAMPLE_MIME_BOUNDARY_--
Content-Type: multipart/mixed;
boundary="----=_SAMPLE_MIME_BOUNDARY_"

------=_SAMPLE_MIME_BOUNDARY_
Content-Type: text/plain;
Content-Transfer-Encoding: 8bit

email data

------=_SAMPLE_MIME_BOUNDARY_
Content-Type: application/octet-stream;
name="test_attachment"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test_attachment"

<<attachment data>>

------=_SAMPLE_MIME_BOUNDARY_
Content-Type: text/plain;
Content-Transfer-Encoding: 7bit;
Content-Disposition: inline;

!-- Sample footer note --! 
------=_20160127171644_62291--
如果默认情况下电子邮件内容类型为multipart/mixed,则我正在更新电子邮件内容,如下所示:

Content-Type: multipart/mixed;
Boundary="--=_SAMPLE_MIME_BOUNDARY_"

email original data

----=_SAMPLE_MIME_BOUNDARY_
Content-Type: text/plain;
Content-Transfer-Encoding: 7bit

!-- Sample footer note --!
----=_SAMPLE_MIME_BOUNDARY_--
Content-Type: multipart/mixed;
boundary="----=_SAMPLE_MIME_BOUNDARY_"

------=_SAMPLE_MIME_BOUNDARY_
Content-Type: text/plain;
Content-Transfer-Encoding: 8bit

email data

------=_SAMPLE_MIME_BOUNDARY_
Content-Type: application/octet-stream;
name="test_attachment"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test_attachment"

<<attachment data>>

------=_SAMPLE_MIME_BOUNDARY_
Content-Type: text/plain;
Content-Transfer-Encoding: 7bit;
Content-Disposition: inline;

!-- Sample footer note --! 
------=_20160127171644_62291--
内容类型:多部分/混合;
boundary=“---=\u SAMPLE\u MIME\u boundary\u”
------=\u样本\u MIME\u边界_
内容类型:文本/纯文本;
内容传输编码:8比特
电子邮件数据
------=\u样本\u MIME\u边界_
内容类型:应用程序/八位字节流;
name=“测试附件”
内容传输编码:base64
内容处置:附件;filename=“测试附件”
------=\u样本\u MIME\u边界_
内容类型:文本/纯文本;
内容传输编码:7bit;
内容配置:内联;
!-- 示例页脚注释--!
------=_20160127171644_62291--
但当我更新电子邮件正文时,Outlook会将示例注释视为附件。在雷鸟的情况下,当我点击转发邮件时,它会将页脚视为附件

所以我的问题是,在电子邮件中添加页脚文本的最佳方式是什么?
我做得对吗?建议更改/查明是否有任何错误。

邮件的MIME结构错误。这是必须的

multipart/mixed
    multipart/alternative
        text/plain
        text/html
    application/octet-stream