Outlook weblink does not always correctly open the mail - outlook-restapi

When I'm getting the property weblink from a message through the outlook API 2.0 REST call, it sometimes works and sometimes doesn't.
That's to say:
For my testaccount dirk#useitgroup.onmicrosoft.com.
When I get the weblink I get something like:
https://outlook.office365.com/owa/?ItemID=AQMkAGI...%3D%3D&exvsurl=1&viewmodel=ReadMessageItem.
opening this weblink correctly opens the mail after redirecting to something like.
https://outlook.office365.com/mail/deeplink?ItemID=AQMkAGI...%3D%3D&exvsurl=1.
for my live.com account I also get a weblink
for instance something like:
https://outlook.live.com/owa/?ItemID=AQMkA...3D%3D&exvsurl=1&viewmodel=ReadMessageItem.
which then after redirection gets translated to something like.
https://outlook.live.com/mail/0/deeplink?ItemID=AQMkA...%3d%3d.
This link never opens the mail, but keeps showing me "loading" instead.
The difference seems to be the outlook.office365.com vs the outlook.live.com.
My live account is for a family office365 subscription.
Is there any way to get this to work with a live account as well?

Related

Why are my Sharepoint Links missing the Tenant?

I am working on an automate flow that emails a share point page to a list of subscribers whenever the page is updated.
Everything works except the links contained in the email (/page). On share point i am able to navigate to the link however in the email the page redirects me to /sites/xxx/xxx.aspx. It is missing the tenant information.
Is there a setting i missed or something that is preventing sharepoint from including the full link when sending the email?
I made sure the full link was typed when the hyperlink was created and am using an HTTP to share point (in automate) and inserting the "CanvasContent1" into the email. I checked the html being sent and the link title is given as the full link but the href is given as /sites/xxx/xxx.aspx.
Thank you for everything
On a SharePoint page, links will be converted to relative links when the page is saved.
If you copy the page content as rendered into an email, then, yes, the tenant will not be included in the link, since the link is never intended to be used outside of the context of the page, where the link works fine.
So, you need to change your approach when emailing the page. Maybe email just a link to the page, then people can take it from there. Or, manipulate the html content in PowerAutomate and replace /sites/xxx with https://Yourtenant.sharepoint.com/sites.xxx

Gmail - Link to Draft in non-conversation view

I am importing/creating drafts in Gmail using the Gmail API. After creation I'd like to redirect the user to the Gmail UI with the opened Draft in the composer window.
I made it work properly for https://mail.google.com/mail/#drafts?compose=[MESSAGE ID]. Other urls I found here also worked well. Gmail is doing some redirects and eventually the composer window is opened with the draft.
Now my issue:
If the user has not enabled "Conversation view" this will not work at all. The redirect will then result in https://mail.google.com/mail/u/0/#drafts?compose=new and only an empty, new composer window is shown and a new draft is created by the UI.
If I open the draft directly the ID-format is different. https://mail.google.com/mail/u/0/#drafts?compose=hJzgZpSqgLQcCWgZqnlNRzRBfMbjZVnZklzvcFxhQCdwT... and I have no idea if this format can be generated somehow.
Does anybody has an idea or experience to also make it work with this UI setting. How I can force Gmail to load the draft into the composer window?
Thanks in advance.
If you have Email Threading > Conversation View enabled
Make use of the following URL
https://mail.google.com/mail/u/0/#inbox?compose=DRAFT_MESSAGE_ID
If you have disabled the Email Threading > Conversation View option
Make use of the following URL
https://mail.google.com/mail/u/0/#inbox/DRAFT_MESSAGE_ID
Additional information
The main difference between them is that the first is treated as a conversation while the second example is not.
You can use #drafts instead of #inbox in the URL.
The number after .../mail/u/ is the session you have opened
You can retrieve the DRAFT_MESSAGE_ID by making a request to the API
You can approximately generate the compose ID by yourself, there are some examples out there (not recommended). I strongly recommend you to use the DRAFT_MESSAGE_ID instead.
This appears to still be an issue the one solution I did find was that you can find your draft directly (even though it would be the last draft) and go through multiple accounts by redirecting to
https://accounts.google.com/AccountChooser?authuser={user account}&Email={email account}&continue=https://mail.google.com/mail/#search/rfc822msgid:CAMU-31NcJCVHyGNsAycRKfuS0nMonoaZ6wFMD90Sej996qjuPQ#mail.gmail.com
You need to get your message id toi replace the area from <> from your draft. So you'll have to create the draft first. Get the google message ID, then use that with messages/get to get the Global Message Id (also referred to as message id) and then use that with a search. At this point you'll open a page with a search to a single draft but it will not be opened. Your users will have to click on the one message. Unfortunately there does not seem to be a way to have the good way work for conversation view, and this way work for non.
I tried many different URLS and nothing worked. As noted in the original question, it might work that you could link to the full URL but I see no way to get that. If you spend long enough working with an email you'll even find that ID changes so they aren't even stable within a single day.
Another solution that could work is as explained:
https://mail.google.com/mail/u/0/#inbox/DRAFT_MESSAGE_ID
But as noted this does not open the draft on the first time you go there. It seems you have to travel to that link 2 times in a row to get the message to appear. I guess you could go to the page maybe inject some javascript to go to the page again but I don't know how to do that.

Modify message with an Outlook web add-in (when reading email, not composing)

I'm trying to establish if this is even possible:
Can an outlook web add-in (i.e. a JavaScript add-in that works on the web and in outlook, not a COM based add-in) modify the body of an email while in read mode (i.e. the user is reading an email, not composing a new email or replying to an email).
What I need to do is trigger the add-in if the email contains hyperlinks (looks like I can do that with a contextual add-in using a regular expression) and then modify those hyperlinks (change the href or add an onClick event handler) so if the user clicks them the behaviour is different.
Based on #OutlookAdd-insTeam-MSFT comment I'll post my own answer:
You cannot modify the body of an email in read mode.
:(
Cant comment. Not enough rep.
I am looking at the documentation for Read Scenario I dont see anything related to set property.
However I do see something about extracting info from an item, more importantly extracting URL's
May be you can extact URL's do your modifications and with the new content you can create a New message item or even Reply and Reply all
It should be able to do that using calling UpdateItem via EWS from the add-in, right? See https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/updateitem-operation
Why wouldn't that work #microsoft?

Add custom text to Sharepoint Email Alert

We have an alert set-up for sharepoint list, but I want to add some custom text to the alert email. We do not have any access to SPD or sharepoint server and can make changes to sharepoint client only.
Can anyone please advice?
The code that sends out emails runs on the SharePoint server via the Timer Job. Since you have no access to do anything with the server you've got absolutely no chance of modifying the built in alert emails.
Could you do this with javascript?
You can't send emails with JavaScript directly. You can open up a draft email in a users default email client using a mailto link but this won't achieve what you want as a user will still have to edit it.
You could, I suppose, put some javascript onto an edit page using a content editor web part (which you can do without SPD) to on changes make an AJAX call to a separate web server to do the actual sending.

mails forwarded by agents do not open in mail box in lotus notes

i have wrote an agent which works like this-
whenever my subordinates get any mail with an attachment; the agent runs and forwards that mail to our HR who can keep a track of all mails.
everything is working fine, but the issue occurs wen HR tries to open the mail..
he gets an notes error - "You are not authorized to access that database"
even though he has an 'Person' 'Manager' accesss in the ACL.
What could have possibly went wrong?
Right click on the doclink and select properties. Check to see what you are actually linking to. I have seen common mistakes like this where the user is creating a doclink to their own mail file.
Try Mail Journalling and find out what it can do for you. Set it up on the Domino server, and add a rule that journals the mails you want.

Resources