Outlook API: Search mail - outlook

I'm trying to search the outlook v2 API for a message containing a URL.
The html body of the message contains a URL:
http://www.google.com
https://outlook.office.com/api/v2.0/me/mailfolders/inbox/messages?$search=%22http://www.google.com%22
Returns no results
%22http%3a%2f%2fwww.google.com%22
Returns no results
%22http%3a%2f%2fwww*google*com%22
Returns the mail
Also returns the message containing http://www.google.co.uk, good company.
Is there any way to query without wildcards that will return only messages with the exact URL match?
Thanks!

According to the Outlook documentation, the Body of a messages is not filterable, so you won't be able to search it for content. https://msdn.microsoft.com/en-us/office/office365/api/complex-types-for-mail-contacts-calendar#message.

You can Microsoft Search API for filtering emails.
https://learn.microsoft.com/en-us/graph/search-concept-messages

Related

Microsoft Graph API: Get all meeting requests from inbox

I am trying to get all Meeting requests from my Inbox via Microsoft graph api.
By this call i get all e-mails in the Inbox:
https://graph.microsoft.com/v1.0/me/mailFolders/inbox/messages
Now i am trying to filter only the Meeting requests
https://graph.microsoft.com/v1.0/me/mailFolders/inbox/messages?$filter=meetingMessageType eq meetingRequest
But this Returns
Could not find a property named 'meetingMessageType' on type 'Microsoft.OutlookServices.Message'.
How can i get all unanswered Meeting requests in a users Inbox?
Thank you very much.
Try to use microsoft.graph.eventMessage/meetingMessageType instead of meetingMessageType
https://graph.microsoft.com/v1.0/me/mailFolders/inbox/messages?$filter=microsoft.graph.eventMessage/meetingMessageType eq 'meetingAccepted'

Mailchimp - API equivalent to Lists Webhook

We can't setup a Webhook for security reasons so we would like to make a request to the Mailchimp API to get the same information that is contained in the Lists webhook (subscribes, unsubscribes, updates etc) and perform this daily.
I've been looking at the Mailchimp API docs and under the Lists section I can't see anything that would allow us to do a GET for all "list activities" similar to what is contained in the Lists webhook.
Does anyone know if it's possible to get the same information via the Mailchimp API that is contained in the Lists webhook?
I found this endpoint:
http://developer.mailchimp.com/documentation/mailchimp/reference/lists/members/#
which you can call using the Query String parameter:
since_last_changed - Restrict results to subscribers whose information changed after the set timeframe
So far this is the closest that I have found.

Get Message Without History From Gmail API

I'm using the Gmail RESTful API directly (not from some library).
Looking at the documentation here Gmail Documentation.
I have managed to get the content of the message body, however it also returns the whole history chain for the current message.
Is there a way to get a response from the API only the requested message body, without the whole thread history?
According to this thread, it is not possible because it is part of the email's body content and you're specifying the ID of the message to retrieve.
You are getting the full reply message. When the report replied, they quoted the original message and this the text of the original is in the reply message. You may just want to do what Gmail and many other modern emails apps do and collapse/hide any reply text which begins with >.
References:
How to get the reply message without the original message from the Gmail API
GMAIL API : How to get the reply without the original message
Most efficient way to get new messages

Google People API Field parameter not working

There seems to be issue with the google people api.
If you go to the following link to test out the api,
https://developers.google.com/apis-explorer/#p/people/v1/people.people.connections.list
try:
GET https://people.googleapis.com/v1/people/me/connections?sortOrder=FIRST_NAME_ASCENDING&fields=connections(emailAddresses%2Cnames)&key={YOUR_API_KEY}
The results does not display the email address of the contact even thou it is specified in the fields.
Thanks,
Derek
You want to supply the requestMask parameter and ask for the email addresses and names explicitly:
This updated query should work:
https://people.googleapis.com/v1/people/me/connections?sortOrder=FIRST_NAME_ASCENDING&requestMask.includeField=person.emailAddresses,person.names&fields=connections(emailAddresses%2Cnames)&key={YOUR_API_KEY}

Receiving emails in Ruby

I'm working with actionmailer. I'm trying to send a mail from email_idA to email_idB, then fetch that email from email_idB, and do some string operations on it to look for specific keywords.
I understood how to send the email. But how do I receive that email from email_idB's inbox? What configurations do I need to do? And how do I extract the email body as plain text?
Did you mean fetch or receive ? Your question uses both these terms and not sure what you mean.
If you just want to do a keyword search on the mails you sent, why not store the outgoing mail in DB and do the search ? (as you said "somehow fetch that email")
To be able to receive emails in your rails app, you would need to implement the receive method in your mailer. Follow this link - link
If you meant fetching emails from your inbox then you have to use POP3. Follow this SO answer - link
Im not sure whats your requirement but I'm sure you will find the above links useful :)

Resources