I then extracted the image URL, using the following expression (so from its beginning to the closing quote):.Then for each item from that array I checked, whether the string starts from “ http” – if yes that meant the element is an URL to an image.I did that using the “split” action using the ‘ src=” ‘ token (yes, with a quote). First I processed the newsletter’s body, to extract all images paths.I managed to do it in couple of steps (having in mind that pure regular expressions are not yet available for Flow, vote for them here): 3 – seemed to be feasible in Flow, however I was also aware, that unfortunately most of the e-mail clients do not support it. This old, but still up-to-date post shows support for base64 encoded images embedded in e-mails: The base64 approachĪs I wrote above, that is fairly easy to do. So the approach with showing images inline using the “ cid method” is not very possible in case you want to show more than one file.Īd. You cannot add multiple (you can vote for it here). 2 – Flow allows you to add only one attachment. 1 – it works like a charm, but as I mentioned above – only when user really has an access to the file.Īd. Embedding image using base64 encoded string, and the “ src= data:image/jpeg base64,” (or png, or gif) value of the src attribute ( source).Īd.The “src=cid” (Content-ID) – so the internal linking in the e-mail, if the file is physically attached to the e-mail it can be displayed inline using the “cid” ( source).The “src” attribute pointing to the file hosted somewhere.However, in that approach, if a recipient has no access to the site, where the file is hosted or is not yet logged in, the images won’t show up. The most straightforward approach was to insert them as a URL to the physical file stored in SharePoint (described here). Naturally, newsletters often contain images. I was working on my newsletter’s solution, aimed to automatically send prepared messages hosted in my SharePoint.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |