further work

This commit is contained in:
Thomas Ruoff
2019-11-18 22:44:05 +01:00
parent 41e3691151
commit 01b0ccf71f
3 changed files with 24 additions and 19 deletions

View File

@@ -11,11 +11,12 @@ const mailer = nodemailer.createTransport({
});
function mail(email, name, pick) {
mailer.sendMail({
from: 'ido@cassiopeia.uberspace.com',
to: email,
subject: `Dein Wichtel ${name} ist ...`,
text: `Hey ${name},
mailer.sendMail(
{
from: "tomru@uber.space",
to: email,
subject: `Dein Wichtel ${name} ist ...`,
text: `Hey ${name},
Dein Wichtel ist *trommelwirbel*
@@ -85,6 +86,10 @@ const run = async () => {
people.map(({ name, pick }) => `${name} picked ${pick}`).join("\n")
);
if (dryRun) {
console.log("DryRun: did not send emails");
return;
}
people.forEach(p => mail(p.email, p.name, p.pick));
};