export default function emailTest(mailTo, username, aliasList) { const aliasTemplate = (x) => { let str = ''; for (const alias of x) { str = str + '
  • ' + alias + '
  • '; } return str; }; const template = { from: 'BorgWarehouse' + '<' + process.env.MAIL_SMTP_FROM + '>', to: mailTo, subject: 'Down status alert !', text: 'Some repositories need attention ! Please, check your BorgWarehouse interface.', html: `
    BorgWarehouse

    Some repositories need attention,
    ` + username + ` !

    List of repositories with down status :

      ` + aliasTemplate(aliasList) + `
    🚩
    Please remember that the status is based on the last modification. Backups are encrypted from end to end between your client and the server controlled by BorgWarehouse. Don't forget to check the integrity of your backups regularly.

    About BorgWarehouse

    `, }; return template; }