Why outbox emails is always an empty array in microsoft graph api? - outlook

I am trying to read my email from Outbox folder.
GET https://graph.microsoft.com/v1.0/me/mailfolders/outbox/messages
I'm using mail flow rules to defear the delivery of the messages by 1 minutes, so the email is going to outbox for almost 1 minute before sending the message
The problem is I'm getting an empty array everytime I query for the outbox folder
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('3bab4ea2-2100-4265-9dee-6aac1adc666a')/mailFolders('outbox')/messages",
"value": []
}
Is something wrong?

Depends how you send the email eg if you send from Outlook and the client is in Cache Mode then when you use delayed delivery the Message is stored in the Outbox in the OST Cache and not synced to the server so wouldn't be available online (and in the Graph). You might want to test it using OWA instead but with OWA it saves deferred delivery messages to the drafts folder not the Outbox.

Related

EWS email exchange: getting message-id from a mail from Sent items

I'm developping a tool that allow to handle and move emails in Exchange.
For moving the mails I do need the message-Id. My issue is that when I intercept mails stored in a folder, I also get sent emails. For those mail, i do not retrieve any Message-Id.
My issue is that i met the following case: one sent email was found in the inbox folder. Unfortunatelly, I do not get any message-Id when i get the information details. Is there a way to get this information from this mail ?

Exchange server filters emails with certain urls in the body of a message and message send fails silently?

I have noticed something very odd about certain emails sent on outlook via an exchange server -- it appears if certain URLs and embedded in the message, message send will fail silently. The message will show up in the "sent items" folder, but it is never actually received by the recipient.
I checked in with GoDaddy who supports my Office365 subscription and they confirmed the behavior (they couldn't send successfully send it either, other me or others in their organization) but had no explanation for the behavior.
I have confirmed that the message sends normally if I use one of my gmail accounts through outlook or or an icloud email account. But my two exchange accounts (on different domains) neither send nor receive any email with this particular embedded url:
(Makes no different if sent in plaintext or not). And other emails, with either no urls or even other urls, send normally. Does Microsoft have a problem with foundation? Or with NFTs or something?
https://foundation.app/#NyanCat/foundation/219
This happens to be the NyanCat NFT that sold for ~$700K a while ago, but no idea what it is about simply the presence of the URL in the body of the message to cause it to fail silently when sent or received on an Exchange server. Not sure if impacts other Exchange servers besides GoDaddy's, but does can anybody explain how this even happening or why?

gmail API Users.messages: list is not getting replies

If I make a request to the gmail API for Users.messages.list it will return 100 of the newest messages.
If I make another request, 1 minute later and there are no new emails it will return the same 100 most recent messages.
If I make a third request, 2 minutes after the original and there is a reply to one of the 100 most recent messages it will still return the 100 most recent messages.
The problem with this is the it only returns the message id and thread id, not if there is a new reply or not. That would mean that I would have to check every message that I have locally stored, or every one of the 100 returned messages just to know if there was a reply to it or not.
The way that works, you couldn't "check" your email via the api because if you had stored 10000 messages and you were checking replies on all of them you would use up your entire API "number of requests" allocation in a single day!
What's wrong with you Google?
Sure I could use pop3 or imap but why when I could just use something like /list_recent?
You should definitely take a look at this part of the Gmail API documentation: https://developers.google.com/gmail/api/guides/push
Basically, it explains you how you can setup a "watch" over a Gmail account and receive notifications (new e-mail, deleted e-mail, labels added...) through Pub/Sub, the messaging queue protocol from Google.
The notifications will contain an historyId, which is a kind of milestone in the Gmail account. Using the /history endpoint, you'll then get the e-mails that were added and/or deleted since this history point. You have to store the latest historyId you handled somewhere in your app, so that you can query the right changes (and not miss anything) on the next notification.
If you don't need to react to changes in real-time, maybe you can call the /history endpoint periodically, but it will definitely be less efficient at scale.
It takes a bit of work to get this working but at the end of the day you get a very efficient system able to react about changes in real-time.

Exchange 2013 NDR issue for not existed user in a mailing list

I have an Exchange 2013 server.
Faced with a strange issue of email delivery what I can not solve.
Exchange is rejecting email
if one of the recipients is not exist in a domain
Email will be rejected totally and sender will receive NDR for not existing user.
scenario:
Exchange mailboxes user#domain.com // valid user
user1#domain.com //**user mailbox is not exist**
Sending email from external domain to my exchange server:
TO: user#domain.com,user1#domain.com
Reciving NDR Remote Server returned '550 5.1.1 RESOLVER.ADR.RecipNotFound;
valid user didn't receive email also.
email is rejected
.
I start to google and found that How do I reject incoming email for unknown users in MS Exchange 2013?
exchange has a user validation feature that is enabled by default
I disable it on a console restart transport role.
Set-RecipientFilterConfig -RecipientValidationEnabled $false
run the same scenario again
user#domain.com, user1.domain.com
I receive NDR for not existing user.
but email was delivered to valid user.
Is it a normal behavior for exchange?
What is right by RFC deliver for valid users or reject email?
how it will affect our server hit the public spam list?
Does this not reduce our spam filter resistance?
Please advice.
Thank you.
It's normal for Exchange to send an NDR for non existing users. As you already said, this might also trigger some spam lists because you are sending out mails (NDR) to possible spam honey pots.
A better way to do this would be to have your external MTA (the server which accepts the mail from the internet) check the recipients and refuse to accept mail for non existent email addresses. This way you would never have to send out NDR reports, as the server trying to deliver mail would be informed that it cannot deliver and notifies the sender itself.

Outlook sent item internet header missing

I have written a C++ app that sync's Outlook emails with our central server DB. Incoming messages contain MessageID info in the internet header - I use this for key generation when placing the messages in the central DB. However, Sent Items in Outlook do not seem to have Internet Headers, so I am stuck for a static id I can use to generate a unique, static GUID for placing the message in the central DB. Multiple Outlook stores are being scanned for multiple users, each user running a copy of the sync program. To be clear, if Pete sends an email to Joe, the email in Pete's Sent Items folder needs the same id to be generated as the id generated for the email when it arrives in Joes Inbox folder - Pete & Joe are both running the sync software.
Does anyone know whether:
1. You can grab a static MessageID from a Sent Items email item
2. If not, is there another value within the Sent Items email that will be available to the sync app scanning the Sent Items folder, and available to the sync app scanning the Inbox that the email eventually arrives in.
Users could be running Outlook 2002 upwards.
Thanks very much.
The MAPI property PR_INTERNET_MESSAGE_ID is set for outgoing and incoming items.

Resources