编辑电子邮件主题行 (IMAP)
我正在尝试将 IMAP 电子邮件处理与另一个内部系统集成,该系统基于主题行/电子邮件内容使用的内容。
在将电子邮件移动到新文件夹之前,我们需要能够更改主题行的文本。什么/哪里是一个好的起点?
我环顾四周,通过雷鸟插件或使用 Outlook 在手动意义上是可能的。我似乎无法在 PHP 或任何其他语言中找到相关示例。我还听说这个想法充其量是脆弱的,因为您需要修改电子邮件内容并将其上传回 imap 服务器。
Outlook 实现似乎会删除原始文件并将新文件保存到服务器上的 IMAP 文件夹中。
旁注:是的,我知道这是一个奇怪的要求,虽然将电子邮件转发给我们自己然后移动它是我们的后备计划,但它不太受欢迎,因为它移动了对于回复所有之类有用的原始标头。
任何建议表示赞赏。
PS如果我是盲人,并且手册中缺少一些明显的东西< /a> 让我知道。
I am trying to integrate IMAP email processing with another in house system that bases what it uses off of the subject line / email content.
We need to be able to change the text of the subject line before moving the email to a new folder. What/where would be a good place to start?
I've had a look around and it IS possible in a manual sense, via a thunderbird plugin or using outlook. I just can't seem to find a relevant example in PHP, or any other language for that matter. I also hear the idea is flakey at best as you need to modify the email content and upload it back to the imap server.
The outlook implementation seems to delete the original and save a new one to your IMAP folder on the server.
Side note: Yes I know it is a weird requirement, and although forwarding the email to ourselves then moving it is our fall back plan it is not much liked as it moves original headers useful for things like reply-all.
Any suggestions appreciated.
PS If I'm blind and there is something obvious I'm missing in the manual let me know.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否已经构建了任何代码来处理电子邮件? IMAP 主题行信息存储为标头,因此您需要根据您要查找的功能使用
imap_headerinfo()
和/或imap_fetchheader()
的 PHP 函数为了达到这个目的。您可以让 PHP 检查每个消息标头,如果它与 X 格式匹配,则删除该消息,并使用适当修改的标头信息创建一个新消息。Do you already have any code built to handle the email processing? IMAP subject line information is stored as a header so you would need to utilize the PHP functions of
imap_headerinfo()
and/orimap_fetchheader()
depending on the functionality you're looking for to achieve this. You could have PHP check each message header and if it matches X format, remove the message, and create a new one with the appropriately modified header information.