Reputation: 23
I am running a fantasy sports draft with my friends through a spreadsheet. When a draft pick is made, I want the league to be notified of this event.
So I've developed a Google Apps Script that e-mails the league when a draft pick is made. The problem is I have 24 league members so after 4 draft picks I reach my 100 recipient email quota. I was hoping the recipient quota was limited to NEW recipients but it appears it is total recipients. Does anyone know a work around?
I know I could invest money into a g-suite account but this is a free league so I'm not looking to spend money
function submitPick() {
var draftSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("2019_draft");
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("test_email");
var emailSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Manager Info");
SpreadsheetApp.flush();
//Choose email addresses from 'manager info' tab
var recipient = emailSheet.getRange(2, 6, 25, 1).getValues();
Logger.log(recipient);
//get array of all picks on "draft test" tab (find the latest draft pick)
var picks = draftSheet.getRange(5,23,240,1).getValues();
for (var i=0; i<picks.length; i++){
if (picks[i] == ""){
var latestPick = i;
break;
}
}
//define subject and body of email to be sent
var subject = sheet.getRange(i+1, 2).getValue();
var body = sheet.getRange(i+1, 1).getValue();
MailApp.sendEmail(recipient, subject, body);
}
Upvotes: 0
Views: 142
Reputation: 38200
The "Google" solution is to use Google Groups.
Upvotes: 2
Reputation: 8964
Here's an approach I've used for past projects.
You could setup a Forever Free account with Mailchimp. They allow up to 2000 recipients at 12,000 emails a month. You then have your participants sign-up via a MailChimp form. Then you can leverage Mailchimps API to send messages to your subscribers from Google Apps Script. You'll have to spend some time learning how to use Mailchimp's API but its worth learning.
Upvotes: 1