Creating draft via Google Gmail API

后端 未结 2 1038
谎友^
谎友^ 2020-12-04 03:39

I am trying to create a draft message for a logged in user but keep getting the error Missing draft message when I run the below

require \'googl         


        
2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-04 04:25

    raw in message is the full SMTP message.

    • Either you set the content in body_object
    • Or you set the full SMTP message including headers in message

    eg:

    params = { 'userId' => 'me', 'draft' => { 'message' => {'raw' => 'From: foo@example.com\nSubject:Ignore\n\ntest email' } } }
    

提交回复
热议问题