AnsweredAssumed Answered

Apply Content-ID value in email header for image attachments?

Question asked by wjbarton on Oct 17, 2016

Hi all- I need to add "Content-ID" values in the header of email messages that I'm sending using Nintex's Send Notification activity. I don't see any options to do so in the workflow canvas. This is Nintex Workflow for SharePoint (on-premise). The goal is to attach images to the email and reference the images with <img src="cid:xxxx.png" /> tags in the email's HTML body.

 

I'm able to use a semicolon-delimited string of SharePoint image URLs as the source of my attachments in my Send Notification activity. I'm also able to see the images attached to the resulting email and I can reference those images with cid values in img src attributes. It works well in Outlook but not in other clients that require that there actually be a "Content-ID" header value for each attachment in the email. It works in Outlook because Outlook doesn't require the Content-ID header, and if it's not there Outlook will fall back to the actual name of the attached file.

 

An example header for my email would theoretically include this for each attachment:

 

--boundary Content-type: image/png; name="image001.png"; Content-ID: <image001>

The corresponding img tag in my HTML body would look like this (with additional attributes for alt, width, height, etc.):

<img src="cid:image001" />

My main problem here is getting the "Content-ID: " header added to the email for the attachments.

 

My use case prohibits me from using direct URL references to the actual image URLs in SharePoint, and base64 encoding doesn't work in Outlook so that option is out as well. I just need to get a "Content-ID:" header added for my use case. Also, I'm not allowed to introduce server-side code into the farm, so no Nintex Custom Actions.

 

How can this be done in Nintex, without server-side code?

 

Thanks!

Outcomes