使用 phpmailer 转发电子邮件重播

Forwarded email replay with phpmailer

通常当我们发送回复电子邮件时,我们只是在电子邮件主题中添加 "Re:" 但是当电子邮件来自任何其他转发的电子邮件时,我该如何回复这封电子邮件?

示例:

an email is sent from john@example.com, forwarded from john2@example.com, and received at email address received@example.com. Now when I send a reply from received@example.com to the sender john@example.com what should I do?

我尝试在主题中使用 "Re:",但它不能用作回复电子邮件。 请帮助我。

电子邮件是否被视为回复取决于主题行。作为回复的消息将有一个 In-Reply-To and/or References headers 包含它作为回复或转发的消息的消息 ID。这是在 RFC5322 section 3.6.4. When replying to a message, you need to extract the message ID from the original message and insert it in the references header, preserving any existing entries in there. You can set this in PHPMailer using the addCustomHeader() 方法中定义的。

据我所知,回复和转发之间没有内部区别 - 两者都会添加到参考文献中 header - 唯一通常的区别是它们被发送给谁,而且通常通过在主题行中添加前缀(通常是 re:fw:,但它因语言而异),但请注意,这纯粹是装饰性和信息性的——它不会改变消息的行为或方式它链接到其他消息。