aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Bennett <hello@vantezzen.io>2020-07-29 18:10:30 +0200
committerLibravatar GitHub <noreply@github.com>2020-07-29 18:10:30 +0200
commite2115de25229efb0b56e280044b4f5628bcf0735 (patch)
treef6aeb7fc3921f59b5342666525079d1670847c79
parentMerge pull request #35 from getferdi/dependabot/npm_and_yarn/lodash-4.17.19 (diff)
parentUpdate mail.js (diff)
downloadferdium-server-e2115de25229efb0b56e280044b4f5628bcf0735.tar.gz
ferdium-server-e2115de25229efb0b56e280044b4f5628bcf0735.tar.zst
ferdium-server-e2115de25229efb0b56e280044b4f5628bcf0735.zip
Merge pull request #31 from xthursdayx/master
Adding extended variables for SMTP email
-rw-r--r--.env.example4
-rw-r--r--config/mail.js6
2 files changed, 8 insertions, 2 deletions
diff --git a/.env.example b/.env.example
index db9ae1d..ba46d99 100644
--- a/.env.example
+++ b/.env.example
@@ -4,6 +4,7 @@ NODE_ENV=development
4 4
5APP_NAME=AdonisJs 5APP_NAME=AdonisJs
6APP_URL=http://${HOST}:${PORT} 6APP_URL=http://${HOST}:${PORT}
7EXTERNAL_DOMAIN=ferdi.domain.tld
7 8
8CACHE_VIEWS=false 9CACHE_VIEWS=false
9 10
@@ -28,4 +29,5 @@ SMTP_PORT=2525
28SMTP_HOST=127.0.0.1 29SMTP_HOST=127.0.0.1
29MAIL_USERNAME=username 30MAIL_USERNAME=username
30MAIL_PASSWORD=password 31MAIL_PASSWORD=password
31MAIL_SENDER=noreply@getferdi.com \ No newline at end of file 32MAIL_SENDER=noreply@getferdi.com
33SSL=false
diff --git a/config/mail.js b/config/mail.js
index 6b18db2..f128ce2 100644
--- a/config/mail.js
+++ b/config/mail.js
@@ -21,13 +21,17 @@ module.exports = {
21 | 21 |
22 | Here we define configuration for sending emails via SMTP. 22 | Here we define configuration for sending emails via SMTP.
23 | 23 |
24 | https://nodemailer.com/smtp/
25 |
24 */ 26 */
25 smtp: { 27 smtp: {
26 driver: 'smtp', 28 driver: 'smtp',
27 pool: true, 29 pool: true,
30 name: Env.get('EXTERNAL_DOMAIN'),
28 port: Env.get('SMTP_PORT', 2525), 31 port: Env.get('SMTP_PORT', 2525),
29 host: Env.get('SMTP_HOST'), 32 host: Env.get('SMTP_HOST'),
30 secure: false, 33 secure: Env.get('SSL', false), // true for 465, false for other ports,
34 authMethod: 'LOGIN',
31 auth: { 35 auth: {
32 user: Env.get('MAIL_USERNAME'), 36 user: Env.get('MAIL_USERNAME'),
33 pass: Env.get('MAIL_PASSWORD') 37 pass: Env.get('MAIL_PASSWORD')