Is there a chance that something that has been functioning normally suddenly becomes an error?
I reply automatically with the following settings.But
Failed to send mail: No recipient specified (line 69, file "code")
The error message now appears.
I'm a complete beginner and I'm having trouble finding similar cases.Please let me know
/**
* Google Form Auto-Reply Script
*/
/**
* origin and setting
*/
function autoreply() {
// Subject of automated reply email
var title="Thank you for contacting me about your absence.";
// The body of the automated reply\nmail is a new line.
var body
= "Thank you for contacting me about your absence.\n"
+ "We have received the following.\n\n"
+ "----------------------------------------------------------------------\n";
// Inputs are placed between body 2 and body 2 of the automatic reply mail
var body2
= US>"----------------------------------------------------------------\n"
+ "Fun swimming head coach";
// Set variables for later processing (form and name must match)
var name = 'Name';
varmail = 'email address';
var address="";
varsheet=SpreadsheetApp.getActiveSheet();
varrow=sheet.getLastRow();
var column=sheet.getLastColumn();
range=sheet.getDataRange();
for(vari=1;i<=column;i++){
// Name of entry in spreadsheet
variable=range.getCell(1,i).getValue();
// Spreadsheet Input Values
value = range.getCell(row, i).getValue();
// Add form entry to body
body+="■"+item+"\n";
// Add form input to body
body+=value+"\n\n";
// If the entry in the form is "Name", add "Sama" before the body
if(item===name){
body=value+"Dear\n\n"+body;
}
// If the entry in the form is an email address, put it in the variable address
if(item===mail){
address = value;
}
}
// Add body 2 to body 1
body+=body2;
// Email with address = address, subject = title, body = body
GmailApp.sendEmail(address, title, body, {
from: '[email protected]', name: 'Fun swimming head coach'});
}
Is there a chance that something that has been functioning normally suddenly becomes an error?
Just to guess, has the spreadsheet that GoogleAppsScript used to run been changed and the email address column has been deleted?
Why don't you check your spreadsheet for a column called email address?
© 2024 OneMinuteCode. All rights reserved.