title: The script works from the sheet, but not as addon with the same code
body: <p>The project is published as a Sheets add-on. A trusted tester (also a spreadsheet editor) launches an add-on and it does not work. He receives the message "You do not have access to perform that action. Please ask the owner of this item to grant access to you".
  If the editor starts the built-in script in the same spreadsheet with the same code, then everything works.</p>
  
  <pre><code>var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sName = ss.getName();
  var eds = ss.getEditors();
  var owner = eds[0];
  var ed = eds[1];
  var sheet = ss.getSheetByName("Task");
  var emailAddress = owner.getEmail();
  var subject = "Done! - " + sName;
  var localDate = Date();
  sheet.getRange(12, 2, 1, 1).setValue(localDate);
  var values = sheet.getRange("B2:K11").getValues();
  var message = "#" + values + "#" + localDate + "#";
  MailApp.sendEmail(emailAddress, subject, message);
  ss.removeEditor(ed);
  </code></pre>
  
  <p>Please advise where to dig.</p>