Set user signature with gmail API - How to

萝らか妹 提交于 2019-12-24 06:33:07

问题


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.

Thanks for your responses JPA


回答1:


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())
}


来源:https://stackoverflow.com/questions/40176335/set-user-signature-with-gmail-api-how-to

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!