I have an use case where the addin should be enabled on specific machines instead of all the machines automatically.
Does bt:Url field in manifest.xml support that ?
If the Url is unreachable, mail should be allowed by default instead of being blocked (which is the default response from Outlook)enter image description here
Is there any way to do this ?
There are several ways to bridge the gap (solutions for your scenario):
Administrators can disable the on-send policy by ensuring the user's group policy setting Block send when web add-ins can't load is set to Disabled. To manage this policy setting, you can do the following:
Download the latest Administrative Templates tool.
Open the Local Group Policy Editor (gpedit.msc).
Navigate to User Configuration > Administrative Templates > Microsoft Outlook 2016 > Security > Trust Center.
Select the Block send when web add-ins can't load setting.
Open the link to edit policy setting.
In the Block send when web add-ins can't load dialog window, select Enabled or Disabled as appropriate then select OK or Apply to put the update into effect.
In the onSend event handler you may detect the mailbox or call an external web service which can give the answer whether to run your workload for a specific user / mailbox or not. Following that way you will be able to run your stuff for particular users only.
Read more about that in the Install Outlook add-ins that use on-send artice.
Would Smart Alerts (in preview) help you achieve your goal here?
Note, you can specify SendMode option in the manifest for a Smart Alert. There are three options available - PromptUser, SoftBlock and Block. With the SoftBlock option, if the add-in is unavailable (for example, there's an error loading the add-in), the item will be sent.
Related
I developed an office.js add-in using the ItemSend event. Everything works fine if external service available. But when i was testing send email operation for "unavailable service scenario" get an error like bellow:
"We're sorry, we couldn't access [Add-in Name]. Make sure you have a network connection. If the problem continues, please try again later."
and
"The add-in [Add-in Name] has prevented this item from being sent."
So the question is how to ignore add-in for this situation?
I am testing on web browser.
Thanks.
The group policy Disable send when web extensions can't load must be set to Disable on each applicable machine if you want to let users send emails if the add-in is not available. Read more about that in the Install Outlook add-ins that use on-send section of MSDN.
This is not possible at this time. The Item Send Add-ins are currently meant for mission critical and compliance apps, and if your add-in is not available then mail can not be sent. We are aware of the demand for a "softer" Item Send add-in that will allow for send to occur if your add-in is not available, but we do not have anything to announce at this time.
Note that the Group Policy "Disable send when web extensions can't load" does not affect this scenario, and is actually even stricter. If Outlook cannot retrieve manifests from the Exchange server, then all send will be disabled. That GPO is also meant for deploying compliance Item Send Add-ins and to ensure all your users have the latest manifests that you have uploaded.
I'm using outlook and gmail links to create events.
I populate the params for each link and publishing it to the users.
The link for outlook:
https://outlook.office.com/owa/?path=/calendar/action/compose&rru=addevent&startdt=2021-05-24T12:00:00&enddt=2021-05-26T19:00:00&subject=Change This With A Subject &location=Change This With A Location&body=Change This With A Body Description.
My question is:
It's possible to click, for example, on outlook link (like the link above) to create the event, but somehow make it open the Desktop outlook app and not outlook web?
Many Thanks,
For the URL specified - no. They are run by web browsers by default.
URLs with the https protocol handler are run by web browsers. But you can register a custom protocol handler on a client machine that can launch Outlook by default and pass parameters as you do for a web browser. Read more about that in the Understanding Protocol Handlers article.
Also, you may find Outlook command-line switches helpful, see Command line switches for Outlook 365, 2019, 2016, 2013, 2010 and previous for more information.
Note: This particular issue has significant impact on our customers, which translates to high business impact with direct consequences on revenue.
TL;DR.
How can our Office add-in for Outlook, when a user interacts with our add-in while composing an email draft, minimize the amount of time it takes before the EWS GetItem API will return an OK response for the itemId we receive from Office.context.mailbox.item.saveAsync()?
If it turns out that our add-in has no control over when the item will be persisted to EWS, then what could an end-user do to speed this up?
We are looking for either (a) a technical solution, or (b) messaging to instruct our customers on how to mitigate/fix/work around this issue.
End-User Impact
Some of our customers are unable to send emails using our Office add-in for Outlook, or have to wait an exceedingly long time (> 2 minutes) before their email will send.
Our Goal
We want all of our customers to be able to send emails using our add-in, without having to wait for an unreasonable amount of time.
Additional Context
Based on our logs and customer reports, this issue only exists in the Outlook 2016 for Windows desktop application. We have no evidence to suggest the issue is present in any other version of Outlook, including Outlook 2013 or Outlook for Mac, however it is possible that the issue may be present in those clients as well.
Overview of our add-in
Our add-in integrates with Compose mode to provide additional functionality while composing email messages, such as templates, follow-ups, open and click tracking, and scheduling.
Our add-in works in tandem with our SaaS product like this:
Our add-in sets EWS extended properties on the email message with metadata indicating which features are enabled on that message.
Our SaaS product, out of band, is configured to read from the customer's mailbox via the EWS API. When it encounters EWS extended properties our Office add-in has written, it triggers the code paths to satisfy the desired behavior.
Root Cause Analysis
The root cause of our problem is our interaction with EWS in Outlook 2016 for Windows. In order to successfully interact with EWS to read/write to a mailbox item, it must be aware of that item.
The documentation for Office.context.mailbox.item.saveAsync() says:
In Outlook Web App or Outlook in online mode, the item is saved to the server. In Outlook in cached mode, the item is saved to the local cache.
It goes on further to say:
Note: If your add-in calls saveAsync on an item in compose mode in order to get an itemId to use with EWS or the REST API, be aware that when Outlook is in cached mode, it may take some time before the item is actually synced to the server. Until the item is synced, using the itemId will return an error.
Thus, we have concluded that Office.context.mailbox.item.saveAsync(), although it does indeed return an eventually valid itemId, does not guarantee that any subsequent EWS interaction will succeed. So far, we have found no way to accelerate the process of the Outlook client actually making EWS aware of the mailbox item.
Mitigation
We have attempted to mitigate this problem by polling EWS GetItem to attempt to obtain a ChangeKey for the item with the itemId we receive from Office.context.mailbox.item.saveAsync(). While we have seen that this does eventually succeed, it may take a minute or longer before this occurs. That is simply far too much time for our customers to have to wait.
Understanding "online mode" vs "cached mode"
If the Outlook 2016 for Windows desktop client is in "cached mode", is there anything the user can do to:
…know whether the client is in "cached mode" or "online mode"?
…attempt to force the client into "online mode"?
There is no way to speed this up in cached mode. Unfortunately this is a limitation of saveAsync in compose mode. Some things of note:
1) The EWSId is only valid while the item is a draft. After it is sent, when the item is in sent items, it will have a new EWSId which is not obtainable from the Office.js
2) Could you save your information into the custom properties, instead of the EWS Extended Properties. (Office.context.mailbox.item.customProperties) https://dev.office.com/reference/add-ins/outlook/1.5/CustomProperties?product=outlook
These properties will be saved to the mail in the sent item, but will NOT be transmitted. Then could you find those properties
These are stored as a JSON dictionary on the item in Key/Value pairs. The name of the mapi property is "cecp-[extension id from manifest]" (in PS_PUBLIC_STRINGS)
https://msdn.microsoft.com/en-us/library/office/cc842512.aspx
3) It does kind of sound like a better way to solve this would be an Office.js function that gives write access to this? (though we don't completely understand your scenario). Request for new features should go through UserVoice:
https://officespdev.uservoice.com/forums/224641-general/category/131778-outlook-add-ins.
4) Being in Online Mode would greatly mitigate the time. A User can know whether or not he or she is in online mode, but an Add-in cannot.
https://support.office.com/en-us/article/Turn-on-Cached-Exchange-Mode-7885af08-9a60-4ec3-850a-e221c1ed0c1c
Additionally, the status bar will say "Connected to Microsoft Exchange" in cached mode, and "Online with Microsoft Exchange" in online mode.
Switching to Online mode, removes a lot of the benefits that cached mode has. Cached mode is default in Outlook 2016.
I want to create a web based Outlook Add-in which does not run in the context of a message or appointment. I simply thought about a new group with one button on the home tab. On click, a new window should be shown.
In platform-dependent concepts (like vsto) this was possible. But it seems that this scenario isn´t supported by the new web concepts. At least not in outlook.
The program should run more like a service and observe the outbox and read (extract and transform) and prepare specific messages (maybe archive their contents locally - which is another problem because of the sandbox mechanism).
I want to deploy to windows and mac desktop clients.
Is that even possible?
Is a module extension an alternative? (Is it supported on mac?)
Task Panes and contextual Custom Panes are designed to interact with the selected/open message. You can define add-in commands (custom Ribbon buttons: https://dev.office.com/docs/add-ins/outlook/manifests/define-add-in-commands) that run a JavaScript function in your defined .html page. These functions can do whatever you want and don't necessarily have to interact with the message or Mailbox whatsoever.
However there is no feature that allows you to run a background application - your custom code always has to be executed by the user. The alternative is to use the Graph API (or Exchange Web Services) in a web server or client application context.
A module extension is similar to add-in commands, but by default doesn't run in the context of any message. Module extensions are essentially just a canvas for displaying web pages, but you have access to the Mailbox API.
In outlook, the admin can force all users to endure a spell check for each email.
Can Outlook be set to enforce spell check only for emails that are outbound from the company domain, so that "in-house" emails would not be spell-checked, but all emails going out from the domain would be checked?
The setting comes you are seeing probably comes from the standard Outlook group policy which toggles the outlook setting (tools->options->spelling->always check before sending).
Group policies are applied per computer, or per users. Outlook doesn't appear to offer anything in its configuration pages, and there is nothing in the group policy to make that setting depend on the recipient.
I guess, that it may be possible to build some kind of add-on to accomplish this, but the functionality doesn't appear to exist right now.