Is there a way to send an email via Microsoft Graph with references
or in-reply-to
headers applied?
I've looked at
- Cannot pass "In-Reply-To" parameter to Microsoft Graph sendMail
- https://github.com/microsoftgraph/microsoft-graph-docs/issues/6256
- How do I add In-Reply-To and References to 'Send mail'?
All of these seem to address when replying to a client's response. E.g.) User sends an email to client >> Client sends a reply back >> User sends a reply.
I need a way to thread the emails even if I send them 2 emails back to back. E.g.) User sends an email to client >> User sends a follow up email to client.
Microsoft Graph API's reply
endpoints seems to overwrite any toRecipient
you pass through, and automatically will send the email to the Sender of the previous email:
Reply to the sender of a message using either JSON or MIME format.
So if I were to...
From: me@hotmail.com
To: client@gmail.com
- Send the initial email via
/me/messages/{id}/send
- Then immediately send a follow up email via
/me/messages/{id}/reply
,
It just sends up sending the reply to myself, me@hotmail.com; since Microsoft Graph specifically states that it replies to the sender. In this instance, I'm just replying to my own message.