9
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Google apps script でGmailの下書き(draft)をつくるライブラリ

Last updated at Posted at 2016-01-03

Google apps script でGmailの下書き(draft)をつくるライブラリを作成したので紹介します。

背景

Google apps scriptの標準関数だとメール送信はあるけど下書きが作れない!
Gmail APIを利用した形で実現出来たのでライブラリ化しました。

使い方

下記のような感じでbuildしてmake()で下書きが作成されます。

project id

M6iKsfeXXavjDNzz6EEFRBu141rqerMCH

example

var MailLib = new createHTMLDraftInGmail();
MailLib.From('sample@example.com')
       .To('sample@example.com')
       .Title('title')
       .HtmlBody('body<br>test')
       .make();
9
12
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?