简体   繁体   English

添加格式为“电子邮件”的附件

[英]Add Attachment with Format "email"

Is it possible to generate an email and add this email to another email's attachment?是否可以生成一封电子邮件并将此电子邮件添加到另一封电子邮件的附件中?
I have only found ways to add files like pdf or jpeg but not a mail.我只找到了添加 pdf 或 jpeg 等文件而不是邮件的方法。

EDIT : my problem is that I can't store the email on the server to add it to the attachment编辑:我的问题是我无法将电子邮件存储在服务器上以将其添加到附件中

As the comments say, it's exactly like adding any other attachment, and it's up to you to get the message into a suitable external text file (or string).正如评论所说,这与添加任何其他附件完全一样,您可以将消息放入合适的外部文本文件(或字符串)中。

The only differences are that external email messages are usually saved with a .eml extension, and should use the message/rfc822 MIME type, which PHPMailer knows about and will set automatically given a file with a .eml extension.唯一的区别是外部电子邮件消息通常以.eml扩展名保存,并且应该使用message/rfc822 MIME 类型,PHPMailer 知道并会自动设置给一个带有.eml扩展名的文件。

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

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