KartikTalwar / gmail.js

Gmail JavaScript API
MIT License
3.76k stars 457 forks source link

Is it possible using gmail.js if I know needed email's id to open it in new window ? #675

Closed DainisVerdins closed 2 years ago

DainisVerdins commented 2 years ago

Greetings. My add-on sends rest request to my server. In this server using GMAIL API (thru gmail.js) I am filling data to email(compose). Also server stores id's of emails what was sent. I want to open in separate window on btn press specific email. Is it possible using gmail.js if I know emails ID? (emails ID got thru gmail API)

Emails Could be in Sent or Schedule folder. They are NOT drafts.

josteink commented 2 years ago

If I understand your question correctly, you don’t need gmailjs to do that.

You just need to open a new tab, with the email-ID in the url hash.

See the link-format for when sending emails and the link you get on “view email” after email is sent from a new compose.

DainisVerdins commented 2 years ago

@josteink I mean what I get from GMAIL API the id of needed email. I want it to open in separate window by for example btn click in my add-on. Is it possible?

josteink commented 2 years ago

I have never used the Gmail API, so I don't know what sort of IDs are used there and how they are compatible.

Experiment and see what you get working :)

DainisVerdins commented 2 years ago

@josteink Any ideas how to open in new window email in gmail? Assuming I know that email ID and URL?