From 407f8930c3b1c82c9f20caf21dda787f2688829a Mon Sep 17 00:00:00 2001 From: bush Date: Fri, 20 Feb 2015 07:53:33 +1100 Subject: [PATCH 1/2] Fixed email not getting sent from correct email in config. Added way to change the default name (CyTube Services) that email is sent from. --- config.template.yaml | 1 + lib/config.js | 1 + lib/web/account.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config.template.yaml b/config.template.yaml index 53084d34..acc16472 100644 --- a/config.template.yaml +++ b/config.template.yaml @@ -109,6 +109,7 @@ mail: user: 'some.user@gmail.com' pass: 'supersecretpassword' from-address: 'some.user@gmail.com' + from-name: 'CyTube Services' # GData API v2 developer key (for non-anonymous youtube requests) youtube-v2-key: '' diff --git a/lib/config.js b/lib/config.js index 6f942258..366a1098 100644 --- a/lib/config.js +++ b/lib/config.js @@ -54,6 +54,7 @@ var defaults = { /* the key "config" is omitted because the format depends on the service the owner is configuring for nodemailer */ "from-address": "some.user@gmail.com" + "from-name": "CyTube Services" }, "youtube-v2-key": "", "channel-save-interval": 5, diff --git a/lib/web/account.js b/lib/web/account.js index 1d502dca..dfea1060 100644 --- a/lib/web/account.js +++ b/lib/web/account.js @@ -621,7 +621,7 @@ function handlePasswordReset(req, res) { Config.get("http.domain") + "/account/passwordrecover/"+hash; var mail = { - from: "CyTube Services <" + Config.get("mail.from") + ">", + from: Config.get("mail.from-name") + " <" + Config.get("mail.from-address") + ">", to: email, subject: "Password reset request", text: msg From ff8a9d02fec6fca93311f68cab72169fc6b05609 Mon Sep 17 00:00:00 2001 From: bush Date: Fri, 20 Feb 2015 08:10:04 +1100 Subject: [PATCH 2/2] fixed missing , xD --- lib/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/config.js b/lib/config.js index 366a1098..818e0c57 100644 --- a/lib/config.js +++ b/lib/config.js @@ -53,7 +53,7 @@ var defaults = { enabled: false, /* the key "config" is omitted because the format depends on the service the owner is configuring for nodemailer */ - "from-address": "some.user@gmail.com" + "from-address": "some.user@gmail.com", "from-name": "CyTube Services" }, "youtube-v2-key": "",