Mandrill webhooks: How to get notifications about successful delivery? - mandrill

I have webhooks configured for "send", "hard_bounce" and "soft_bounce".
At 15:12 I got an event from mandrill that email message was hard
bounced.
At 15:14 I got an event from mandrill that the very same
email message was sent.
messages.info API call says that the state of this message is "bounced".
Why mandrill behaves like that? Maybe it's a bug?
If it's not a bug then how to get notifications about successful delivery?
How to contact mandrill and file a bug report? I didn't find any place I could do that.
Update (20.04.2015)
Can you say that mail got delivered, if it contains positive smtp_events and state is sent?

You actually cannot get a webhook notification for when the email is delivered through Mandrill.
The only way of checking if an email has been delivered is to poll Mandrill (with the message/info.json API). To see if the message is delivered you have to check the smtp_events and look for an event with diag starting with 250.

Related

How to know that a specfic incoming sms is a reply to a previous outgoing sms?

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.

Microsoft Graph Api - Notification for Undelivered emails - ImmutableId not matching

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

How to ensure that Publish message through Pubnub IOS SDK was delivered?

I am attempting to integrate PubNub iOS SDK in my project. How can I confirm that the published message was delivered?
Message Delivered Notification
If the publish callback status is success, then you know PubNub Network received it and sent it to all active subscribers.
If you want to be notified when a subscriber or each individual subscriber (if there are more than one) have received the message, then the subscriber(s) need to send (publish) a message back to the publisher.
But how many subscribers are receiving the message? Do you want to receive a message delivered notification for all subscribers? Just something to consider.

Receiving notifications from Slack Direct messages

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.

Asynchronous ActionMailer - some emails don't get sent

I have a Rails app that uses ActionMailer conected with a gmail account to send email notifications.
Recently I put the "sending mail" feature on separate threads so the main request thread doesn't get blocked.
The problem is that some mails don't get sent. In the rails logs it says that the emails were sent, but if I open gmail in the browser and I look at the "sent" section, there are several mails missing.
I presume there is a "too many requests" error somewhere, because the mails are sent asynchronously, very fast. Does it help if I put an incremental delay in every thread? Is there a standard "cool-down" time after which sending mails is ok?
I don't want to use delayed job or other alternatives.

Resources