Send email using GMail API in Google Apps Script

前端 未结 2 1987
面向向阳花
面向向阳花 2021-01-21 01:47

I have a raw email (tested on playground and working) and I want to send it with Google\'s Gmail API from Google Apps Script.

I can\'t find the right syntax for the requ

2条回答
  •  孤城傲影
    2021-01-21 02:00

    I found the solution to my question:

    var RequestArguments = {
      headers: {Authorization: 'Bearer ' + token},
      method: "post",
      contentType: "application/json",
      payload: JSON.stringify(jsonMessage)
    };
    

    jsonMessage is the whole message, not only the raw part!

提交回复
热议问题