Description:
When we forward an email and get the message Id using getMessageId() method of inboxSDK , if we try to get the email message using google api with the help of returned messageId , it throws 'MessageNotFound(404)' error . After refresh it returns the correct messageId and we get the email message.
Steps to reproduce the behavior:
Open gmail and forward the mail (to self mail for instance) and get the messageId using inboxSDK code as shown in below.
sdk.Compose.registerComposeViewHandler(function (composeView) {
composeView.addButton({
title: "Send Mail",
iconUrl: chrome.extension.getURL("icon.png"),
iconClass: "class",
type: "SEND_ACTION",
onClick: function () {
composeView.on("sent", function (sentMsg) {
return sentMsg.getMessageID().then(function (sentMsgId) {
Use google api (https://developers.google.com/gmail/api/reference/rest/v1/users.messages/get) to get the email message with the messageId got above.
Please do it 4-5 times if unable to reproduce. I was able to reproduce 1/3 times.
Expected behavior
We should be able to get the email message based on messageId.
NOTE: It's an intermittent issue.
Regards,
Sachidanand Sachin