简体   繁体   中英

open gmail compose window from javascript (angular)

How can I open a gmail compose window (I don't care much which - popup/modal) with content I provide from Javascript? The context is a groceries app written in angular js where I want to add a button that will send the current list via email, but with the ability to edit it first (so not using GAS MailApp) In particular, the groceries list is large and can't be put as a URL parameter.

you should open window with this link and parameters

https://mail.google.com/mail/u/0/?view=cm&fs=1&to=someone@example.com&su=SUBJECT&body=BODY&bcc=someone.else@example.com&tf=1

Params

to:

su:

body:

bcc:

you can use $window.open with these parameters and provide your text as body

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM