当使用 Office.js 检索包含内联附件的电子邮件正文时,我们会收到如下 HTML:
<div>
<div dir="ltr">
<div style="color:black;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;background-color:white;">
This email has images in the body.</div>
<div style="color:black;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;background-color:white;">
<img data-imagetype="AttachmentByCid" originalSrc="cid:ab24f213-f1a6-4804-ad70-25a4d3ac5f86" naturalHeight="0" naturalWidth="0" src="cid:ab24f213-f1a6-4804-ad70-25a4d3ac5f86" data-outlook-trace="F:1|T:1" tabindex="-1" size="9026" style="max-width:100%;">
<img data-imagetype="AttachmentByCid" originalSrc="cid:be90d9aa-49a6-48fb-b4b9-d50950aefae3" naturalHeight="0" naturalWidth="0" src="cid:be90d9aa-49a6-48fb-b4b9-d50950aefae3" data-outlook-trace="F:1|T:1" tabindex="-1" size="60886" style="max-width:100%;">
<br>
</div>
</div>
</div>
标签<img>
是内联图像附件的位置。
邮箱项目的附件属性列出附件元数据,如下所示:
{
attachmentType: "file",
contentType: "image/jpeg",
id: "AAMkADFlM2Q0MzdkLTJhZWQtNGQzNS05YWI2LWMwYmNkZmMwODNmZgBGAAAAAAAbEbu84Nj1SIfOZGQpQsg/BwC74mYLmMGJSYnZmTQHpD7TAAAAAAEJAAC74mYLmMGJSYnZmTQHpD7TAAE1znR7AAABEgAQACz3QOlxzApEvhIoK7iHWoc=",
isInline: true,
name: "home_team.jpg",
size: 9341
}
我不能在第一个图像标签和这个附件对象之间建立任何链接。是否有其他方法可以识别每个内联附件在邮件中的位置?