I have a Google Spreadsheet with an embedded chart. I'm using this code to send the chart via email:
var charts = SpreadsheetApp.getActiveSheet().getCharts();
MailApp.sendEmail(
"recipient@example.com",
"Income Charts",
"Here's the latest income charts",
{attachments: charts });
But I only get an image with "User not signed in" error. If I make the spreadsheet public it works, but I don't want to do that. I need the spreadsheet private.