This question already has an answer here:
- Not allowed to execute sendEmail() from custom function, but OK in script editor 1 answer
My function below doesn't seem to be firing off any sort of email when the function is called in onEdit(event). I have tried both EmailApp and GmailApp, any help on the matter would be greatly appreciated.
I have also tried to use my personal @gmail.com account and neither will send an email to it again.
function sendAlert() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
var cell = ss.getActiveCell().getA1Notation()
var subject = 'Update to '+sheet.getName();
var body = sheet.getName() + ' has been updated. Visit ' + ss.getUrl() + ' to view the changes on cell ' + cell;
GmailApp.sendEmail('s....@project-la.com', subject, body);
};