Google apps script 更改GmailApp Sendemail中可以使用的发件人地址:必须是;视为别名;现在?

Google apps script 更改GmailApp Sendemail中可以使用的发件人地址:必须是;视为别名;现在?,google-apps-script,Google Apps Script,我有我授权的脚本,可以从我的“作为电子邮件发送”地址之一发送电子邮件;但是,该特定地址在过去没有被选中为“作为别名处理”(设置>帐户>作为邮件发送>编辑信息>取消选中“作为别名处理”)。在过去几周中,使用此方法的脚本失败,错误为“执行失败:无效参数:nontreatasaliassendasaccount@____.edu. 我找不到此更改的文档。from参数将如何继续工作 //---abbreviated script (last line throws error)--- function

我有我授权的脚本,可以从我的“作为电子邮件发送”地址之一发送电子邮件;但是,该特定地址在过去没有被选中为“作为别名处理”(设置>帐户>作为邮件发送>编辑信息>取消选中“作为别名处理”)。在过去几周中,使用此方法的脚本失败,错误为“执行失败:无效参数:nontreatasaliassendasaccount@____.edu.

我找不到此更改的文档。from参数将如何继续工作

//---abbreviated script (last line throws error)---
function sendFormByEmail(e) {  
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
var message =""; 
var columns = sheet.getRange(1,1,1,lastColumn).getValues()[0];

//collate form questions/answers to send in email  
for (var keys in columns) 
var questionName = columns[keys];
//creates list of all questions and answers 
if (e.namedValues[questionName] && (e.namedValues[questionName] != "") ){
message += "<b>" + questionName + "<\/b>" + ": "+
e.namedValues[questionName] + "<br>"; 
}
}

//send mail to requestor with form questions/emails
//(sent from a non-primary send-as email address 
//that is NOT marked as an alias in Settings > Accounts > Send Mail As)
GmailApp.sendEmail("recipient@___.edu", "Thanks for your request", "",
{htmlBody: message, from:"nontreatasaliassendasaccount@_____.edu"});
/---缩写脚本(最后一行抛出错误)---
函数sendFormByEmail(e){
var ss=SpreadsheetApp.getActiveSpreadsheet();
var sheet=ss.getActiveSheet();
var message=“”;
var columns=sheet.getRange(1,1,1,lastColumn).getValues()[0];
//整理表格问题/答案以发送电子邮件
for(列中的变量键)
var questionName=列[键];
//创建所有问题和答案的列表
if(e.namedValues[questionName]&&(e.namedValues[questionName]!=“”){
消息+=“”+questionName++”:+
e、 名称值[问题名称]+“
”; } } //向请求者发送带有表格问题/电子邮件的邮件 //(从非主要电子邮件地址发送) //在“设置”>“帐户”>“将邮件发送为”中未标记为别名的) GmailApp.sendmail(“recipient@___.edu“,”谢谢您的请求“,”, {htmlBody:消息,来自:nontreatasaliassendasaccount@_____.edu"});
在不更改任何内容的情况下,我再次能够使用
GmailApp.sendmail
发送电子邮件,并将发件人电子邮件地址指定为非别名的辅助发送方式帐户:

突然又起作用了
GmailApp.sendmail(“recipient@___.edu“,”谢谢您的请求“,”,
{htmlBody:message,from:“not_treat_as_alias_send_as”_account@_____.edu“});
也有效 (且在上述情况未发生的期间内)

GmailApp.sendmail(“recipient@___.edu“,”谢谢您的请求“,”,
{htmlBody:message,from:“别名_发送_作为”_account@_____.edu“});

我从未找到有关功能更改的文档。

您能详细说明您的问题吗?您能发布您正在使用的代码吗?我添加了缩写脚本
GmailApp.sendEmail("recipient@___.edu", "Thanks for your request", "",
{htmlBody: message, from:"not_treat_as_alias_send_as_account@_____.edu"});
GmailApp.sendEmail("recipient@___.edu", "Thanks for your request", "",
{htmlBody: message, from:"alias_send_as_account@_____.edu"});