提问人:Mohit Kamal 提问时间:8/23/2023 最后编辑:Gugu72Mohit Kamal 更新时间:8/31/2023 访问量:74
触发 Gmail compose UI React
Triggering Gmail compose UI React
问:
我有这个要求,即打开 mail.google.com 并使用一些预填充的数据打开撰写 UI 流。这需要通过 React 应用程序来实现。有没有办法做到这一点?
答:
0赞
Kadir Damene
8/23/2023
#1
const openGmail = () => {
const subject = encodeURIComponent('Put the subject here');
const sender = encodeURIComponent('[email protected]');
const body = encodeURIComponent('E-mail body');
const url = `https://mail.google.com/mail/?view=cm&fs=1&su=${subject}&to=${sender}&body=${body}`;
window.open(url, '_blank');
};
这够了吗?
评论
0赞
Mohit Kamal
8/24/2023
是的!正是我所寻找的。有没有办法在 gmail 中预附加文件?
评论