App Script Google sheets sender email id change after the ownership transfer

72 Views Asked by At

How to change the sender of the email after the ownership transfer of the app script code in google sheets?

I have transferred the ownership of a Google Sheets App Script code, which sends emails to relevant stakeholders upon certain events.

code:

function sendEmailByRow(row)  
{
   var values = SpreadsheetApp.getActive().getSheetByName("Projects").getRange(row,1,row,45).getValues();  
   var row_values = values[0];
   var candidate_email = composeCandidateEmail(row_values);  // to staff
 
   MailApp.sendEmail(
      candidate_email.email,
      candidate_email.cc,
      candidate_email.subject,
      candidate_email.message
   );  //on saying yes it will send an email                  
}

I have tried running the code from my id as well but didn't work. The code contains no block where the sender's mail id is mentioned. (MailApp function is used)

I want the email to go from my Email Id.

0

There are 0 best solutions below