Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google apps script 电子邮件主题和正文中的动态数据(月)_Google Apps Script - Fatal编程技术网

Google apps script 电子邮件主题和正文中的动态数据(月)

Google apps script 电子邮件主题和正文中的动态数据(月),google-apps-script,Google Apps Script,我目前正在进行一个项目,我需要在每个月的第一天发送一封自动电子邮件。我为月份格式创建了一个变量。 我需要在主题和邮件正文中输入月份。这是我的密码 function emailnotifications() { const currentMonth = Utilities.formatDate(new Date(), "GMT+4", "MMMM"); GmailApp.sendEmail('test5@gmail.com', 'Monthly re

我目前正在进行一个项目,我需要在每个月的第一天发送一封自动电子邮件。我为月份格式创建了一个变量。 我需要在主题和邮件正文中输入月份。这是我的密码

function emailnotifications() {
  const currentMonth = Utilities.formatDate(new Date(), "GMT+4", "MMMM");
  GmailApp.sendEmail('test5@gmail.com', 'Monthly report notification'(currentMonth), 'Please note that the monthly report of Stock of (currentMonth) that had been extracted to following folder: https://drive.google.com/drive/folders/xxxxxxxxxxxxxx')
}

将此
“月度报告通知”(currentMonth)
更改为此
“月度报告通知(“+currentMonth+”)”


或者
`Monthly report notification(${currentmount})`
,整个字符串周围都是背景符号。

第一个非常有用,谢谢你
('+currentmount+')
@iansedano谢谢你的编辑。我想不出来