Update message and Outlook Web caching? - microsoft-graph-api

When using the Update message API from Microsoft Graph (https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/message_update) to update the body of an email, although the API succeeds and you can see in the preview of the email in the Outlook web interface that the new body has been applied you cannot see the new body in the full message until you completely refresh the page. It seems that the web interface downloads the preview and the full body of the message from different places. Any tips on how to make the Outlook web pick the new message without a refresh?

The API take the preview and the full body of the message from the same place. But we will not refresh the full page by default(Ajax). So we just see the preview content. We cannot do that without a refresh, but I think we maybe do it without significant refresh(ajax to replace page content too, still trying)

Related

Custom email tracking not sending request when opened in Gmail

I´m trying to develop a custom email tracking system for my Rails webapp following the pixel approach. If I understood it right, the idea is to insert a one pixel image with source to a url that process the request. In my case, when the request is process it sends a new notification email to me.
In the email body I have inserted:
<img src="localhost/api/to?trackId=<%= id %>" style="display: none"/>
When I open the email in web Gmail with Chrome, I see next code, but unfortunately nothing happens:
<img src="https://ci4.googleusercontent.com/proxy/ncea8tesMNBOixfbJrQ1VL458oukzkLaIlWW6RbqedZ9mkMjsfgeIAWa5EWXcX4HOi0vLwDmFg=s0-d-e1-ft#http://localhost/api/to?trackId=1435" style="display:none;outline:none;text-decoration:none;height:auto!important;border:0" class="CToWUd">
When I just type the url directly in my browser, like: http://localhost/api/to?trackId=1435 my server gets the request and process it perfectly.
I have read in some other posts that Gmail is proxing the image and this is not working anymore. However, I think there should be one approach if there are lots of mail tracking services.
Do I have a mistake in my code, or should I try another approach?
Google replaces all images with copies in their cache. This copy cannot be retrieved from your localhost obviously.

Session using url rewriting

I have a JSF web application and I am adding the jsessionid in the URL using URL rewriting. The reason is our users want to log into the application using different accounts in each browser instance or using multiple tabs of the same browser. I was successful in implementing this.
However, I am having one problem.
Whenever the application opens a popup window, the control goes to the popup, but when the user clicks on any link in the main window, it throws an internal server error without any further descriptions. I have checked show user-friendly error messages in IE, but is of no use. Any idea why the main window errors out when the popup is opened.
Please let me know if you need further clarifications.
Thanks.

Programmatically get reply / forward state via office-js?

I have an Outlook Office-JS addin that adds what is basically a third-party send via an addin command button. In the background, this does some processing on the draft message then sends it via the Office365 / Graph send API: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/message_send
I've verified when I do send the message from the backend component of my app, I do see that the e.g. reply headers are set correctly, but apparently this isn't enough to set the parent message as replied / forwarded in Outlook.
Given that, I'd like to manually set the parent message as replied to / forwarded when sending. From reading other posts it looks like the following attributes https://learn.microsoft.com/en-us/office/client-developer/outlook/mapi/pidtaglastverbexecuted-canonical-property could help me do that.
However, I'm not sure how to identity a draft message on either the Office-JS side or via the Graph API as a reply / forwarded email, nor do I know how to get the parent message (original email replied to / forwarded) handle or ID.
Currently you cannot get the state of a draft or the parent ID with Office JS. What is your scenario for saving a message as a draft and then sending with Graph? We track Outlook add-in feature requests on our user-voice page. Please add your request there. Feature requests on user-voice are considered when we go through our planning process.

Keeping Track of campaign, strange behaviour from gmail

I know question I am going to ask is not related to programming, but I dont know where to put this question so i am asking it here.
I am working on sending campaign to newslettersubscriber. I want to keep track of the email opened count to know the response from our customers. Technology I am using is ASP.NET MVC3 , SQL Server 2008. I have token in my email template(campaign) which is replaced by one specific url, which isDisplay images below image is downloaded.And method in my common controller is called and corresponding row is updated.
Now after this email is sent to customers. when i sent opened my own GMAIL inbox and opened this campaign. I inspected html element. but markup i saw was diffrent from my original url
Image
Is should <img src="http://www.mysite.com/common/EmailViewedNotificationHandler?id=30-E1663091-8849-442D-81C1-0DDE97771B55"
But interpreted as
<img src="https://ci5.googleusercontent.com/proxy/WnpVRMliHHhtbOu6y6GmZD4l4kVePPdRWR4BTNQY_OLeQ2IFJOJHwuvy2qThpWJUQBKpA7hmf09pkxDfnfQCszDDs2YHfIWd3iqGRMpsD6cNXO0UTLf4BN6Cbj43KfDkaCVrlwIZl-B0y8LlrWvjaheDRhd_f2ryjpib_c8f4K4=s0-d-e1-ft#http://www.mysite.com/common/EmailViewedNotificationHandler?id=30-E1663091-8849-442D-81C1-0DDE97771B55"/>
This was the case for my first campaign but with second campaign event this url wasnt there it was only <img>
By Gmail
Any Solutions
Thanks In Advance
This is new for Gmail but it pretty much screws you over for tracking an email campaign in Gmail. Google now caches images in emails and displays the cached versions to users (the URL you're seeing is to a Google caching server). This means that you will likely receive only one and exactly one request for each image in each email you send since Gmail will have to make a request to your server for the initial caching.
But to be honest you couldn't count on Gmail for accurate campaign tracking anyway since they moved to the "smart inbox" system that is supposed to automatically prioritize your inbox. I'm not sure what else Google has done to anger email marketers but the ones I work with really don't like Gmail.

Facebook Open Graph Scraping

I've recently enabled the Facebook Open Graph stuff on my web app (so and so has just read this and that on here and there). Now I post the request to Facebook when a user posts something, as part of the page load in the controller. The problem is I receive the following error:
HTTP 500: Response body: {"error":{"type":"Exception","message":"Could
not retrieve data from URL."}}
My first thought is that the open request to load the page is blocking any FB scraping of OG information, as it seems after it's been cached I no longer receive this error.
Is this likely? If so, what's the best way to work around it?
WHY THIS HAPPENS:
I had this same problem today, and it is because your Koala script (assuming you're using koala - if not, you should try it out because it's great) sends its request to Facebook before your URL is up. This means that when Facebook registers the post, it comes to the URL you specified to pick up the meta tags. Unfortunately, the page itself hasn't been loaded yet, giving it a 500 error
HOW TO SOLVE IT:
Use the delayed_job gem to prevent your post call from occurring before the page loads, which allows facebook to scrape your metatags correctly.
FOR EXAMPLE:
def post_to_facebook([ACCESS_TOKEN])
graph = Koala::Facebook::API.new([ACCESS TOKEN])
graph.put_connections("me", "[APP NAMESPACE]:[ACTION]", :[OBJECT TYPE] => [OBJECT_URL])
end
handle_asynchronously :post_to_facebook

Resources