Outlook and Gmail Link to create event - events

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.

Related

How to send an email from an outlook office add on?

I am trying to build an outlook add on, using react. I looked everywhere trying to find something that uses the mailbox in which the addon has been opened from, to programmatically send an email to a specified user.
Something similar to the google's command:
GmailApp.createDraft(e.parameters.address, e.parameters.subject, e.parameters.body, {
htmlBody: e.parameters.body,
name: 'Automatic Sender'
}).send();
Is the mail-sending process available on outlook?
Outlook web add-ins work under the context of currently selected item only. OfficeJS doesn't provide anything for creating and sending emails programmatically.
In Outlook add-ins you may consider using EWS, see Call web services from an Outlook add-in for more information. Also you may take a look at the Graph API as a possible workaround.

Is there an Outlook Javascript API to get control to addin on Saving as Draft or before syncing to server?

I am working on an Outlook addin to make sure confidential information is not leaked using mail.
Using the on-send feature using ItemSend, we were able to get the email fields and block the sendmail, if required
https://github.com/OfficeDev/Outlook-Add-in-On-Send/tree/master/outlook-add-in-on-send
But there is an use case
User composes the mail and saves it to draft (without clicking on Send)
In outlook on web, composing a mail saves to draft automatically.
How can the add-in get a callback when draft is synced to Outlook server ?
How can the add-in get a callback when draft is synced to Outlook server ?
There is no such callback available for web add-ins. You may post a feature request or suggest a feature on the Tech Community site where community members get to share ideas on ways MS can make Microsoft Graph and Office Platform better by sharing feature requests and ideas.
Nothing like that for the JS-based addins.
For the COM addins, OOM exposes MailItem.Write event - your event handler can cancel the operation.

Outlook Add-In: Ignore On-send Event when Remote Service Unavailable

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.

Outlook Web Addin - Event handlers

I have a business requirement where there is a need to extend the functionality of outlook.
I am exploring Office Web Addins for this requirement.I have following queries.
I need to automatically move all incoming email to an external location.Does Office JS API provide handlers to incoming email event?
If it possible to define an action with Office JS API , which when triggered can loop through all the current unread emails and perform some action on each email (like move certain emails to a certain external location )
Is it possible to append custom headers to a email being composed using Outlook web add-in?
No
You can use EWS for that
No.
If your code only needs to run under the Windows version of Outlook, a COM addin might be a better option.
Unfortunately, it seems not possible to meet your requirements using Outlook Web Addin.
For more information, please review the following link: Outlook Add-ins overview

command for sent mail in outlook web app addin

Recently I tried the outlook web app add-in in visual studio 2015. It's cool one It purely based on the Java script commands. My ultimate motivation i need add one button in add-in if user click that button I need the save the mail my database and send that mail to the recipient.
I am able to fetch the data and saving to my database is successful but unable to trigger send option in add-in. There is any java script command available. Actually I have achieved the same scenario in outlook windows application.
You should be able to send the email using the new Outlook REST APIs specifically we have an api for sending emails. In addition, to close the compose form, you can use the Office.context.mailbox.item.close() To close the mail or calendar item in compose.
You should try to send the email from server side logic using EWS (exchange web services) see this post or you can authenticate with Azure Active Directory and invoke the outlook REST API

Resources