How to schedule emails on yet another mail maerge

YAMM (Yet Another Mail Merge) is a Google Sheets add-on that allows you to send personalized emails using a template and a list of recipients. To schedule emails on YAMM, you can use a combination of YAMM's built-in features and Google Apps Script. Here's a step-by-step guide:

Method 1: Using YAMM's built-in scheduling feature

  1. Create a new email campaign in YAMM and set up your email template and recipient list.
  2. Click on the "Schedule" button next to the "Send" button.
  3. Choose the date and time you want to send the emails.
  4. Select the time zone you want to use.
  5. Click "Schedule" to schedule the email campaign.

Method 2: Using Google Apps Script

  1. Create a new script in your Google Sheet by going to Tools > Script editor.
  2. In the script editor, create a new function that will send the emails using YAMM's API. You can use the following code as a starting point:
    
    function sendEmails() {
    var sheet = SpreadsheetApp.getActiveSheet();
    var dataRange = sheet.getDataRange();
    var data = dataRange.getValues();

var yam = YAMM(); var templateId = 'your-template-id'; var recipients = data.map(function(row) { return { name: row[0], email: row[1] }; });

yam.sendEmails(templateId, recipients); }

Replace `your-template-id` with the ID of your YAMM template.

3. To schedule the script to run at a specific time, you can use the `ScriptApp` service. Add the following code to your script:
```javascript
function scheduleEmails() {
  ScriptApp.newTrigger('sendEmails')
   .timeBased()
   .atHour(12) // send emails at 12:00 PM
   .everyDays(1) // send emails every day
   .create();
}

This code will trigger the sendEmails function every day at 12:00 PM.

  1. Save your script and go back to your Google Sheet.
  2. Click on the "Run" button next to the script editor to test the script.
  3. Once you've tested the script, you can schedule it to run automatically by clicking on the "Triggers" button in the script editor and setting up a new trigger.

Note: Make sure to replace your-template-id with the actual ID of your YAMM template, and adjust the script to fit your specific needs. Additionally, be aware of YAMM's sending limits and terms of service when scheduling large numbers of emails.