MailApp.sendEmail

36 views
Skip to first unread message

Kevin Corcoran

unread,
May 1, 2026, 1:50:34 PM (3 days ago) May 1
to Google Apps Script Community
Hello, Can someone please help me figure out why my script for  MailApp.sendEmail has worked flawlessly for several years and just in the past few days it's stopped sending the email? I edited it to have the email go to myself and it worked again but using the old email address as well as two other emails in our office we get nothing.

Are there any known issues for this, or recent updates where I have to allow the email to go to someone besides me?

function sendFormByEmail ()
{
  var email = "mye...@mydomain.com" //sets the recipient who should receive the email
  var subject = "TC Edit" //sets the subject of the email.
 
  var s = SpreadsheetApp.getActive().getSheetByName("Form Responses 1"); //get the spreadsheet by name
  var lr = s.getLastRow(); //gets the last row from the spreadsheet name from above
  var lrTime = s.getRange(lr,1).getValue(); //gets the value from the last range in the colum # specified for the 'Time' column
  var lrName = s.getRange(lr,2).getValue(); //gets the value from the last range in the colum # specified for the 'Name' column
  var lrCategory = s.getRange(lr,3).getValue(); //gets the value from the last range in the colum # specified for the 'Category' column
  var lrFixRequest = s.getRange(lr,4).getValue(); //gets the value from the last range in the colum # specified for the 'FixRequest' column
  var lrFixReason = s.getRange(lr,5).getValue(); //gets the value from the last range in the colum # specified for the 'Fix Reason' column
  var lrSchedulingReq = s.getRange(lr,6).getValue(); //gets the value from the last range in the colum # specified for the 'Scheduling Request' column
  var lrSchedulingReason = s.getRange(lr,7).getValue(); //gets the value from the last range in the colum # specified for the 'Scheduling Reason' column
 
  //this is the body of the message. Note: "+\n\n" adds a spacing between lines.
  var message = " Timestamp: " + lrTime +"\n\n" +" Name: " + lrName +"\n\n" + " Category: " + lrCategory+"\n\n" + " Fix Request: " + lrFixRequest+"\n\n" + " Fix Reason: " + lrFixReason+"\n\n" + " Scheduling Request: " + lrSchedulingReq+"\n\n" + " Scheduling Reason: " + lrSchedulingReason+"\n\n";

  MailApp.sendEmail(email, subject, message)
 
  }

Keith Andersen

unread,
May 1, 2026, 1:55:49 PM (3 days ago) May 1
to google-apps-sc...@googlegroups.com
Is this a Workspace account or Free Gmail account?

Check your quotas against how many emails would be sent with your script.





My website: https://sites.google.com/view/klaweb/
Passions: God, Family, Scriptures, Learning, Data Management, Google Sheets + App Script and much more!

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-script-community/d7eb08fe-b6fc-40ae-97f0-620fd0e421can%40googlegroups.com.

Peter Isakson

unread,
May 1, 2026, 3:47:48 PM (3 days ago) May 1
to Google Apps Script Community
This:
function checkQuota() { const remainingQuota = MailApp.getRemainingDailyQuota(); Logger.log("Remaining email quota: " + remainingQuota); }

Zero is bad.

Kevin Corcoran

unread,
May 1, 2026, 3:47:58 PM (3 days ago) May 1
to Google Apps Script Community
About the quotas, as I mentioned if I I have the email to to ME it works, but to any other email address it stops.
Thanks

Kevin Corcoran

unread,
May 1, 2026, 3:48:08 PM (3 days ago) May 1
to Google Apps Script Community
It's a workspace account I think, it's my profile on our business account

On Friday, May 1, 2026 at 10:55:49 AM UTC-7 Keith Andersen wrote:

Kevin Corcoran

unread,
May 1, 2026, 10:50:57 PM (3 days ago) May 1
to Google Apps Script Community
Again, it can't be a daily quota thing. It works fine and will email my address, but will not email any other address.
Reply all
Reply to author
Forward
0 new messages