How to get inline attachments (inline images) only? - outlook

I am using Microsoft Graph.
How to get inline attachments (inline images) only?
I tried both v1.0 and beta API
GET /me/messages/{messageId}/attachments?$filter=isInline eq true
But it always gives me all attachments including attachments that isInline is false.

Related

Power Automate Embed Image

My goal is to embed an image under outlook via power automate. I was able to check some online guides however still having an error.
Unable to process template language expressions in action 'Send_an_email_(V2)' inputs at line '0' and column '0': 'The template function 'outputsoutputs' is not defined or not valid.'.
I have attached a screenshot of my flow and the function I used.
I have checked videos online. My goal is to embed an image to outlook.
You are using wrong expression in src of image. Try using outputs instead of outputsoutputs.
Follow below links for more information:
Power Automate: Embed an image in an email
Add images to email messages
How to send an email with an embedded image

Synchronous pdf generation through pdfmonkey

I am using pdfMonkey to store PDF template and generate PDF, I am calling pdfMonkey API mentioned in below link for generating pdf. I am getting success response but download_url is coming as null and preview_url is also returning 400. In order to fetch the PDF download url, I have to call get document API. So I have to do couple of API calls to generating a PDF. Is there any way I can generate PDF in single API call?
https://docs.pdfmonkey.io/references/api/documents#generating-the-document-upon-creation

Is it possible to embed an Outlook .msg into an application using OLE?

If you have some application with an ordinary HWND, is it possible to embed an Outlook email .msg file into the window using OLE?
It appears that, after opening an Outlook message using OpenSharedItem, you can successfully QueryInterface for IOleObject. But after that, I can't seem to successfully call any IOleObject methods.
Thanks for any input.
MSG file format is well-described in MSDN. So, you can read the content without any third-party components or interfaces. To display the content (I guess the message body) you can use any web browser (for example, WebView2). The message body (HTMLBody) is represented by a regular web page. Most probably you will also need attached files that are used in the body.
Another possible alternative to use Extended MAPI for getting item properties. For example, you can use any third-party components for simplifying the work - Redemption.

Show Extended Properties created via REST API in Outlook

I've created an Outlook extended property for contacts with the REST API described here. This is the relevant JSON payload.
{
"singleValueExtendedProperties": [
{
"id":"String {b06defca-5b03-4ee3-ba80-c5c9f49bea8d} Name MyProp",
"value":"true"
}
]
}
This prop is successfully saved and returned if I request instance of contacts with this extension via REST API.
contacts?$filter=singleValueExtendedProperties/Any(ep: ep/id eq 'String {b06defca-5b03-4ee3-ba80-c5c9f49bea8d} Name MyProp' and ep/value eq 'true')
So far, so good.
But how can I show this extension within the Outlook application, e.g. in Outlook for Mac v16.15 ? I assume, that I can add such an extension as additional column in the list view of all contacts. There are always columns named 'Benutzerdefiniert 1' .. 'Benutzerdefiniert 8' (in english 'User defined'). But nothing. Also nowhere within the huge (and BTW very good) Microsoft Graph docs I found any hint linking from the MS Graph REST API into the Outlook app.
What is necessary to have visible custom Outlook properties managed by the MS Graph REST API ?
Kind regards
Dominik
have you tried using Outlook web addin?
You can create an outlook web addins in order to show the extension properties in outlook like this image below.

Safely using remote HTML

I have been asked to pass some html which is being sent from my server to my Firefox add-on through a function called parseHTML by a Mozilla add-on reviewer. The method in question is documented in this XUL school tutorial.
In my content script however, typeof parseHTML == "undefined". I believe this is because my add-on is built using the add-on SDK, not XUL.
It is correct that add-ons built with the SDK do not have access to this method? Is there an equivalent method in the SDK?
Of course this function is undefined - it isn't some globally defined helper but rather something you have to define in your code (as shown in the code example). It uses the nsIParserUtils interface that you would need to have access to. In an SDK-based extension you would use chrome authority for that:
var {Cc, Ci} = require("chrome");
var parser = Cc["#mozilla.org/parserutils;1"].getService(Ci.nsIParserUtils);
var sanitized = parser.sanitize(html, parser.SanitizerAllowStyle);
If you are in a content script then you cannot use that of course - you would need to send the HTML code to the add-on, sanitize it there and send it back to the content script. While this is an option, you might want to consider other possibilities like not using innerHTML in the first place (if all you need is setting some text on an element then textContent is a safe alternative).
Side-note: While XUL Tutorial is rather old, this particular page has only been imported into MDN a year ago - and updated regularly since that according to history. So it is current, just not meant explicitly for the Add-on SDK (like most MDN articles actually).

Resources