回答編集履歴
1
追記
answer
CHANGED
@@ -9,4 +9,37 @@
|
|
9
9
|
});
|
10
10
|
}
|
11
11
|
```
|
12
|
-
参考[sendEmail(Object)](https://developers.google.com/apps-script/reference/mail/mail-app#sendEmail(Object))
|
12
|
+
参考[sendEmail(Object)](https://developers.google.com/apps-script/reference/mail/mail-app#sendEmail(Object))
|
13
|
+
|
14
|
+
追記02/11 21:00
|
15
|
+
---
|
16
|
+
|
17
|
+
```GoogleAppScript
|
18
|
+
// 送信先オプション
|
19
|
+
var options = {};
|
20
|
+
if ( bcc ) options.bcc = bcc;
|
21
|
+
if ( reply ) options.replyTo = reply;
|
22
|
+
|
23
|
+
}
|
24
|
+
// メール送信
|
25
|
+
if ( to ) {
|
26
|
+
MailApp.sendEmail(to, cc , subject, body, options);
|
27
|
+
}else
|
28
|
+
MailApp.sendEmail(admin, "【失敗】Googleフォームにメールアドレスが指定されていません", body);
|
29
|
+
```
|
30
|
+
↑この部分を次のように書き換えれば上手くいくと思ったのですがどうでしょうか?
|
31
|
+
|
32
|
+
```GoogleAppScript
|
33
|
+
// メール送信
|
34
|
+
if ( to ) {
|
35
|
+
MailApp.sendEmail({
|
36
|
+
to: to,
|
37
|
+
cc: cc,
|
38
|
+
bcc: bcc,
|
39
|
+
replyTo: reply,
|
40
|
+
subject: subject,
|
41
|
+
body: body
|
42
|
+
});
|
43
|
+
}else
|
44
|
+
MailApp.sendEmail(admin, "【失敗】Googleフォームにメールアドレスが指定されていません", body);
|
45
|
+
```
|