I am trying to fetch sent mail associated to a draft mail using gmail api.
I have a messageId of a draft email. I am fetching the draft Id from the browser address bar url (Eg: https://mail.google.com/mail/u/0/#inbox?compose=1570432re9b57469)
After sending the message the email gets moved from the drafts to the sent box. Also the messageId gets changed for the sent mail.
Tried to fetch the draft using gapi.client.gmail.users.drafts javascript gmail api. But got the error "Requested entity was not found".
The message is not sent using gapi. The message is sent using the normal gmail compose window.
Is there any way to get the sent mail id associated to the draft mail using the draft messageId or any other reference?
id
field in the response of thedrafts/send
method? Isn't this the message id?https://developers.google.com/gmail/api/v1/reference/users/drafts/send
– rednebMessage-Id
header? – redneb