matomo
matomo copied to clipboard
Image attachments for scheduled reports not working in Outlook
For HTML based email reports, there seems to be certain circumstances where Outlook shows a "Attachment not found" error related to how the images are attached, for example:
<img data-imagetype="AttachmentByCid" data-imageerror="AttNotFound" originalsrc="cid:CustomReports_getCustomReport_idCustomReport--10" border="0" id="x__x0000_i1028" style="width:524.99pt;height:149.99pt;">
However, the same email reports work in other mail providers, such as Gmail.
After some further investigation, it seems that this post is perhaps related: https://answers.microsoft.com/en-us/outlook_com/forum/all/cid-image-embeds-are-not-loading-properly-in/37cef54a-e9cf-4591-9f39-a0b5e539b178
The post above mentions that in order for the cid images to load, they needed to change the code to change where the image is attached (See second last post)
Good find @Starker3, we should be able to use that example code adjust how we generate the multipart mime attachment so it's in the format outlook wants :+1:
This issue has been mentioned on Matomo forums. There might be relevant details there:
https://forum.matomo.org/t/how-are-evolution-images-attached-to-email-reports-ours-show-missing-images/57630/3
Thank you for reporting this issue @Starker3. We have tried to reproduce this issue in Outlook for Web on a Mac and on Windows. Additionally, we have tried Outlook for Mac and have not been able to reproduce the issue even when adding custom reports with evolution graphs. Is there any other additional information you could provide to help us reproduce the issue?
@randy-innocraft I've done some additional testing on this and can at least confirm that it happens for Custom Reports that use Evolution graphs.
Error message:
([Error] Failed to load resource: unsupported URL (cid:CustomReports_getCustomReport_idCustomReport--68, line 0))
Custom Report configuration:
The error doesn't seem to be reproducible for reports other than Custom Reports that are configured as Evolution graphs.