tree: c06f0836f1bf8d9b5513026f112efddabad7bdf9 [path history] [tgz]
  1. emailsamples/
  2. .gitignore
  3. composer.json
  4. composer.lock
  5. config.default.php
  6. README.md
  7. sendEmails.php
utils/README.md

Utils

This folder has some scripts which are useful to do several small tasks.

Before running any of them, you should first run composer install to install the dependencies (install Composer if it's not already installed in your computer).

Send emails

This util lets you send emails to users before the game begins. You should have a file similar to the emailsamples/users.csv file with a list of users with some info about each one and an autogenerated password. Then you can use this util with your file to send an email to each user to remind them of the rules and send them their password.

To send emails, run php sendEmails.php < users.csv, where users.csv has a form similar to the emailsamples/users.csv file.

Before you do that, you should copy config.default.php to config.php and set up the Mailjet API keys. You might also have to change the template ID in the sendEmails.php file to use your own email template.

Create Mailjet template

For the email, you can use the template at emailsamples/template.mjml as your starting template. Go to https://app.mailjet.com/templates/start/transactional, click the By coding it in MJML tab, and select the Import MJML from file option. Then upload the template file.