I'm facing an issue correlating failed emails. I'm using Microsoft Graph Api. Below are the steps I have followed.
Created a draft mail with Prefer IdType="ImmutableId" in the header.
Sent the draft mail
For success scenarios, I have subscribed to Notifications ( webhook ) on the "Sent Items" folder. This is working fine. Here the ImmutableId in the notification is same as the Id in the response when I created a draft email.
For failure scenarios, I have created another Notification subscription with the resource value as below,
/users/abc.com/mailFolders/{mailFolderID}/messages?$filter=startsWith(subject,'Undeliverable'). Here i'm using a filter.
Problem = The Id which arrives in this failure notification is not the same ImmutableId. So i'm not able to correlate the sent mail to its failed notification. Somehow it looks like the ImmutableId is the not the same when subscribed using a filter/query.
ImmutableId refers to the underlying Exchange Store Object, in your send scenario the store object remains the same between drafts and sentItems (all that happens during send is the message is moved) but once a message is sent and even if that same message was received by the sending mailbox (when that message is received) Exchange will create a new Store Object for the received message with an new Id and these objects (the one in SendItems and the one in the inbox) won't be directly linked. The way to correlate them is usually you would use the internetMessageId which would be the same on all copies of the Message. For an undelivered message you would need to get that property by expanding the attached undelivered message eg
https://graph.microsoft.com/v1.0/me/messages/AA..=/attachments/AA.=/?$expand=microsoft.graph.itemattachment/item
Related
This is the method and I am trying to use. When my bot sends an ephemeral message (and evens #'s the user it's sending an ephemeral message to), the recipient is not getting notified.
However, the recipient (getting #'ed) gets notified if I change the message to a normal message, using the postMessage method.
I am trying to cancel event using graph api but it picks the wrong mailbox type (x500) when sending the notification, I want graph-api to select smtp address instead of x500.
Is there any way to cancel event without sending any notification to attendees. or to force the graph-api the use smtp mailbox type when it sends the notification.
I am integrating Twilio SMS service where my users are able to send SMS messages to their clients. I would like to be able to link each reply with the sent SMS. In another word, is there any field in the Message Resource that could lead me to conclude whether the incoming message received is related to the outgoing message my user sent previously ? I need same behavior as Email send/reply functionalities.
Twilio developer evangelist here.
There is no way to do this I’m afraid, the SMS protocol has no information about users replying to a specific message. SMS is chronological, you can test this by opening your phone’s SMS app and trying to reply to the second to last message you received from someone. In SMS there’s no way to do that.
The best thing you can do is consider the messages chronologically, and assume that the reply is in response to the last message you sent to that number from the number you sent it from.
I suspect your are interested in this because you need to send notifications and get responses to those notifications and you realised you might need to send more than one notification to a user at a time but still get their responses. The best way to get around this is to use different numbers to send the different notification messages from, then when they reply you can tell which notification they were replying to by the number they sent the message to.
I'm building a simple slack bot and can currently send private messages as well as checking for the last 10 messages received within this one-to-one channel.
Is there a way of getting a POST notification to my webservice whenever the user replies, instead of having to poll and continuously check messages on that one-to-one channel?
Now you can make use of Slack events to receive notifications.
In the give use-case, 'Message' event can be used to capture message received and process accordingly.
https://api.slack.com/events/message
Bots generally work by connecting to the real-time messaging API, a WebSocket-based API that sends you events as they happen. Specifically, you should see a message event sent to you every time a message visible to your bot is sent.
To answer your question, there's no way to get an HTTP POST sent to you instead; you'll need to connect to the RTM API and listen for events that way.
I am writing a IM app on iOS, and not sure about how to ensure that the other side has received my message. Could anyone give me some suggestions or existing frameworks?
You can have the device that receives a message send data back that confirms the message has been received. Most likely each message would be assigned a unique id that the receiving device would send back so that it knows specifically which message was received.
I am not familiar with Pubnub but looking quickly at their SDK it looks like you can send messages both directions on a single channel, or else you could setup one channel for sending messages and one channel for confirming messages.