I am making CRM for Gmail.
I want to get the unique "email id" in my chrome extension from the "xhr" response when "Send" button is clicked. I have not overridden any gmail functionality.
My plan is to use that email id to get the email using gmail api.
Is there any other way by which I can get the email data when the email is sent and save it in my system?
Thanks in advance!
After searching for a week, I got a way to get the unique emailID.
When email is sent, a link is displayed - "Your message has been sent. View message".
View Message is a link. If you inspect this link, you will get a span element. It has an attribute 'param', which contains the emailID.
I fetched emailID from there and passed it in request to gmail API to get the email data.
I know it is not a permanant solution, but working for me as of now.
If someone knows some other solution, please share.