tracking outlook emails using microsoft graph api - email

I would like to create an application to find out how much time taken to reply to an email. ie, when an email arrived, need to get the time and when I replied to that email need to not that time and find how much time i spend on replying that email.
for this purpose I have used Microsoft graph API v1.
https://graph.microsoft.com/v1.0/me/messages -> can read all the mails. but it contain all incoming and outgoing emails.
i need only list of incoming emails first and then reply time based on the same.

To get messages in a specific folder in the user's mailbox:
GET /me/mailFolders/{id}/messages
GET /users/{id | userPrincipalName}/mailFolders/{id}/messages
To get more Optional query parameters: https://learn.microsoft.com/en-us/graph/api/user-list-messages?view=graph-rest-1.0&tabs=http#optional-query-parameters

Related

Get all email addresses from GMAIL with whom I exchanged emails

I want to get email addresses from my account with API. I can get those emails from my contacts, but don't succeed to get those emails who are not in my contacts, but I had email conversations with them before. From where I can get any doc or information how to get that information from API?
I think your only option is going to be doing a user.messages.list loop though each message and run a user.messages.get and check the sender email address.
The API doesn't return the the information you are looking for. You could also just start adding these people to your contacts.
Its an interesting idea you may want to submit it as a feature request. Issue tracker

sendgrid email via X-SMTP

I am trying to figure out how can I make it possible to send an email from my
application to Sendgrid and have it come back.
I want to use coldfusion to send an email using X-SMTP API. I found a documentation
online here but still wondering if there's any documentation available other
than the web API one?
http://thehatrack.net/blog/integrating-sendgrid-with-your-coldfusion-application/
SendGrid's Event Webhook is the only way to get email reads on an individual basis. This will POST an event to your server every time an email is read (among several other events).
The only "pull" based solution to get individual email events from SendGrid is the bounces endpoint, which will tell you when an email bounces (and is certainly not read), but nothing else.
If you want to retrieve individual read events from SendGrid, you'll need to connect the Event Webhook to an external service like Keen.io, and then leveraging their API to get individual events.

Creating a plugin/component that will filter incoming emails on an exchange server?

Is there a predefined protocol / API that will allow me to create a plugin component for exchange (let's say 2007+)?
I need to write a simple spam filter that will communicate with the exchange server and receive every mail that is received by that server. If the mail doesn't pass a check, it will be deleted from the server before being delivered to the user. If it is ok, it will be placed in the user's inbox.
I am looking for a protocol that supports the following:
subscribe to receive a notification whenever an email arrives to the server (before the email is placed in the users' in-box.
get the content of such emails.
have the ability to block further processing on some emails (so they are blocked before reaching the inbox).
Thanks in advance,
May be u can write a transport agent(Exchange Server 2007onwards) which will monitor and act on all the emails flowing through the organisation.
You can get most of the details of an email via a transport agent depending on the event at which u trigger the agent.
Here's a link which gives a thorough documentation.
http://msdn.microsoft.com/en-us/library/exchange/bb204097(v=exchg.150).aspx
You can check body/subject and if it doesn't comply with any of the organisational policy,just clear off all the recipients and the email delivery won't happen.

New #facebook.com email - API Howto?

With the new #facebook.com emails being available for all users I'm wondering if there is an Graph API call that can be made to obtain a users facebook email address?
From what I've seen you can simple take the users alias (as we see in the URL) and slap on the #facbook.com to get the email. Until I cam across a friend who had his FB Id instead of the alias listed on his account.
I tested this by sending an email to myself using myid#facebook.com and myalias#facebook.com. The ID failed to send while the alias sent and was received with no issues.
Ideas?
Thanks.
Some people can receive mails from both ID#facebook.com and ALIAS#facebook.com, and some people cannot receive ID#facebook.com with an mailer error saying that it's not in their address book.
I wasn't able to see any pattern here, it was random. Not sure this is an error or a spec.

Tracking email responses

What is the best way of tracking responses for email campaigns? I was thinking on adding something to the reply-to field of the email (for example luqita+campaigns#stackoverflow.com), but I'm not sure if there is something more neat that could avoid this?
I thought about headers too, but it's important to note that the address luqita#stackoverflow.com would send many different campaigns, and the 'in-reply-to' header info would not be useful then to differentiate (while using luqita+campaign1 or luqita+campaign2 could)
What can I do?
So you want to be able to execute some logic when someone replies to an email you have sent through SendGrid? If you have access to change the MX record of the domain of the email address at which you want to receive the replies, you could use SG's Parse API to get a POST request to a script whenever email is receive at the address.
I think you would indeed have to set a magic reply-to address for each campaign. This seems like a perfectly fine solution; it's also how SG itself tracks bounces - it sets the return-path to something like bounces+{attempted-recipient-email}#sendgrid.com. Then examine the 'to' parameter of the POST notification you receive to know which campaign the reply is associated with.
When you say "tracking responses", do you mean that you expect users will reply to the Email, or do you mean that they'll click on a link in the Email and interact with a web site?
SendGrid obviously offers click tracking and open tracking, and you can set up to 10 different categories for tracking campaign stats and see delivery/bounces/opens/clicks/etc based on those categories. They also have a Google Analytics plugin that can feed back some analytics data to Google. And as #LinusR mentioned in his answer, the SendGrid Parse API can be set up in a way that reply Emails can get parsed and posted back to your site.
If the user will be interacting with your web site, you can use the "unique args" setup at SendGrid to set a unique string/hash to append to any URLs that can help identify a particular user, campaign, or whatever else you want to track.