- First of all, create an Appery.io database and name it DbWithUsers.
- Open the Users predefined collection and add several email addresses to it by clicking the +Row button and providing the needed data:
- Go to the Server Code > Plugins tab and import the SendGridEmail plugin:
Note that with this plugin, several related snippets have been added, so we will need to edit this script to customize it.
- Click Create script to create a new script, name it to BulkMailingWithSendGrid and clear the default code.
- Then filter the snippets list by SendGridEmail and click the corresponding link to insert the sendEmailBulkMailing snippet:
- In the code editor, locate the from and apiKey entries, replace their variables with your own SendGrid parameters, and save the script:
- Under the script Settings tab, select your database with the users' list (in our case, it's DbWithUsers):
- That's all and now, you can set any subject and body and send a bulk email to your app users.
Scheduling Bulk Email Sending
If needed, you can additionally schedule an automatic job that will send all script emails at a specific time.
To do it, switch to the Jobs tab and specify the needed data for your BulkMailingWithSendGrid script:
Updated 16 days ago