回答編集履歴

1

軽微な修正&参考リンク添付

2023/02/24 00:26

投稿

pig_vba
pig_vba

スコア807

test CHANGED
@@ -1,12 +1,12 @@
1
1
  attachmentsの設定位置が間違っています。その為、[sendEmail(recipient, subject, body, options)](https://developers.google.com/apps-script/reference/gmail/gmail-app?hl=ja#sendemailrecipient,-subject,-body,-options)に5つの引数を与えているというエラーが発生しています。
2
2
 
3
3
  ```GAS
4
- var options = {
4
+ const options = {
5
- "bcc" : "@@@@@@@@",
5
+ bcc : "@@@@@@@@",
6
6
  attachments: pdf
7
7
  };
8
8
 
9
9
  GmailApp.sendEmail(to,subject,body,options)
10
10
  }
11
11
  ```
12
-
12
+ [GASでメール送信する際の各種オプション](https://blog.synnex.co.jp/google/options-sending-email-by-gas/)