email - ForAll 循环破坏 Lotus Notes 中电子邮件的内联图像
问题描述
我确实有一封包含内嵌图像的 Lotus Notes 电子邮件。当我运行以下仅更改电子邮件主题的代码行时,内联图像会丢失。
Sub Initialize
Dim ns As New NotesSession
Dim nc As NotesDocumentCollection
Dim nd As NotesDocument
Set nc = ns.Currentdatabase.Unprocesseddocuments()
Set nd = nc.GetFirstDocument()
ForAll Items In nd.Items
End ForAll
Call nd.Replaceitemvalue("Subject", "Forall")
Call nd.Save(True, False)
End Sub
问题是由实际上没有做任何事情的 ForAll 循环引起的。如果循环被注释掉,内联图像仍保留在电子邮件中。
我希望你们中的任何人有一个想法或建议如何解决这个问题。
干杯,马丁
解决方案
访问项目时,您的邮件正文可能正在从 Notes 富文本转换为 MIME,然后被重新保存,从而失去保真度。
尝试ns.ConvertMIME = false
在代码的开头设置。
推荐阅读
- python-3.x - Python selenium headless firefox 在生产中不能与 WSGI 一起工作,但在开发模式下工作
- python - 模块“django.template.context_processors”未定义“custom_proc”属性/类
- r - R Shiny - 从 selectizeInput 的列表中构建一个 tabsetPanel
- python - 如何在自定义命令中获取本地 API url
- ios - 如何在 Swift 5 中对 [int: String] 的字典进行排序
- javascript - 我怎样才能让 unshift 方法和这个基于 Promise 的代码在本教程中工作?
- javascript - Particle-JS 响应式画布高度问题
- linux - 与 linus 条件 '-z' '-n' 混淆
- macos - 我无法在 VM Ware 虚拟机上打开 Mac OS Mojave,并且上面有我需要恢复的数据文件
- laravel - 在 laravel 的登录控制器中添加太多尝试