diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-10-20 22:41:41 +0000 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-10-22 20:35:45 +0000 |
commit | 36f1551b3359abc776596c6ac0e60ac10040a3de (patch) | |
tree | 4b919a73e9a342f2f7ca06a8c191073d35b599e5 /server.js | |
parent | 70a0e746bea86b3e78e8b0c999f24fabf73e049b (diff) | |
download | server-36f1551b3359abc776596c6ac0e60ac10040a3de.tar.gz |
Print mail sent log messages.
Diffstat (limited to 'server.js')
-rw-r--r-- | server.js | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1023,8 +1023,6 @@ const QUERY_LIST_UNSTARTED_GAMES = db.prepare("SELECT * FROM game_view WHERE sta function mail_callback(err, info) { if (err) console.log("MAIL ERROR", err); - else - console.log("MAIL SENT", info.envelope.to); } function mail_addr(user) { @@ -1046,6 +1044,7 @@ function mail_password_reset_token(user, token) { "Your password reset token is: " + token + "\n\n" + "https://rally-the-troops.com/reset_password/" + user.mail + "/" + token + "\n\n" + "If you did not request a password reset you can ignore this mail.\n"; + console.log("SENT MAIL:", mail_addr(user), subject); mailer.sendMail({ from: MAIL_FROM, to: mail_addr(user), subject: subject, text: body }, mail_callback); } @@ -1059,6 +1058,7 @@ function mail_your_turn_notification(user, game_id, interval) { "It's your turn.\n\n" + "https://rally-the-troops.com/play/" + game_id + "\n\n" + MAIL_FOOTER; + console.log("SENT MAIL:", mail_addr(user), subject); mailer.sendMail({ from: MAIL_FROM, to: mail_addr(user), subject: subject, text: body }, mail_callback); } } @@ -1077,6 +1077,7 @@ function mail_ready_to_start_notification(user, game_id, interval) { "Your game is ready to start.\n\n" + "https://rally-the-troops.com/join/" + game_id + "\n\n" + MAIL_FOOTER; + console.log("SENT MAIL:", mail_addr(user), subject); mailer.sendMail({ from: MAIL_FROM, to: mail_addr(user), subject: subject, text: body }, mail_callback); } } |