使用gmail API设置用户签名-如何 [英] Set user signature with gmail API - How to

查看:108
本文介绍了使用gmail API设置用户签名-如何的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有人已经使用gmail API为具有应用脚本的用户创建签名? 我看过此链接:" https://developers.google .com/gmail/api/v1/reference/users/settings/sendAs " 但是我不知道如何使用它.

Has someone already use gmail API to create signature for a user with apps script ? I've seen this link : "https://developers.google.com/gmail/api/v1/reference/users/settings/sendAs" But I don't know how to use it.

感谢您的回复 JPA

Thanks for your responses JPA

推荐答案

使用Gmail高级服务可以做到这一点: https://developers.google.com/apps-script/advanced/gmail

This is possible using the Gmail advanced service: https://developers.google.com/apps-script/advanced/gmail

function setSignature() {
  var newSig = Gmail.newSendAs();
  newSig.signature = "MY NEW SIGNATURE!"
  Gmail.Users.Settings.SendAs.patch(newSig, "me", Session.getActiveUser().getEmail())
}

这篇关于使用gmail API设置用户签名-如何的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆