diff options
author | vantezzen <hello@vantezzen.io> | 2020-04-02 17:09:11 +0200 |
---|---|---|
committer | vantezzen <hello@vantezzen.io> | 2020-04-02 17:09:11 +0200 |
commit | 6ed9da44690d5f68a5bb4e398c0a4ad4083ed6fa (patch) | |
tree | 77778897d7411d7c273d1b1bdf7caf7ba75f85e2 /config/mail.js | |
parent | Upgrade dependencies (diff) | |
download | ferdium-server-6ed9da44690d5f68a5bb4e398c0a4ad4083ed6fa.tar.gz ferdium-server-6ed9da44690d5f68a5bb4e398c0a4ad4083ed6fa.tar.zst ferdium-server-6ed9da44690d5f68a5bb4e398c0a4ad4083ed6fa.zip |
#16 Implement Password reset
Diffstat (limited to 'config/mail.js')
-rw-r--r-- | config/mail.js | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/config/mail.js b/config/mail.js new file mode 100644 index 0000000..6b18db2 --- /dev/null +++ b/config/mail.js | |||
@@ -0,0 +1,101 @@ | |||
1 | 'use strict' | ||
2 | |||
3 | const Env = use('Env') | ||
4 | |||
5 | module.exports = { | ||
6 | /* | ||
7 | |-------------------------------------------------------------------------- | ||
8 | | Connection | ||
9 | |-------------------------------------------------------------------------- | ||
10 | | | ||
11 | | Connection to be used for sending emails. Each connection needs to | ||
12 | | define a driver too. | ||
13 | | | ||
14 | */ | ||
15 | connection: Env.get('MAIL_CONNECTION', 'smtp'), | ||
16 | |||
17 | /* | ||
18 | |-------------------------------------------------------------------------- | ||
19 | | SMTP | ||
20 | |-------------------------------------------------------------------------- | ||
21 | | | ||
22 | | Here we define configuration for sending emails via SMTP. | ||
23 | | | ||
24 | */ | ||
25 | smtp: { | ||
26 | driver: 'smtp', | ||
27 | pool: true, | ||
28 | port: Env.get('SMTP_PORT', 2525), | ||
29 | host: Env.get('SMTP_HOST'), | ||
30 | secure: false, | ||
31 | auth: { | ||
32 | user: Env.get('MAIL_USERNAME'), | ||
33 | pass: Env.get('MAIL_PASSWORD') | ||
34 | }, | ||
35 | maxConnections: 5, | ||
36 | maxMessages: 100, | ||
37 | rateLimit: 10 | ||
38 | }, | ||
39 | |||
40 | /* | ||
41 | |-------------------------------------------------------------------------- | ||
42 | | SparkPost | ||
43 | |-------------------------------------------------------------------------- | ||
44 | | | ||
45 | | Here we define configuration for spark post. Extra options can be defined | ||
46 | | inside the `extra` object. | ||
47 | | | ||
48 | | https://developer.sparkpost.com/api/transmissions.html#header-options-attributes | ||
49 | | | ||
50 | | extras: { | ||
51 | | campaign_id: 'sparkpost campaign id', | ||
52 | | options: { // sparkpost options } | ||
53 | | } | ||
54 | | | ||
55 | */ | ||
56 | sparkpost: { | ||
57 | driver: 'sparkpost', | ||
58 | apiKey: Env.get('SPARKPOST_API_KEY'), | ||
59 | extras: {} | ||
60 | }, | ||
61 | |||
62 | /* | ||
63 | |-------------------------------------------------------------------------- | ||
64 | | Mailgun | ||
65 | |-------------------------------------------------------------------------- | ||
66 | | | ||
67 | | Here we define configuration for mailgun. Extra options can be defined | ||
68 | | inside the `extra` object. | ||
69 | | | ||
70 | | https://mailgun-documentation.readthedocs.io/en/latest/api-sending.html#sending | ||
71 | | | ||
72 | | extras: { | ||
73 | | 'o:tag': '', | ||
74 | | 'o:campaign': '',, | ||
75 | | . . . | ||
76 | | } | ||
77 | | | ||
78 | */ | ||
79 | mailgun: { | ||
80 | driver: 'mailgun', | ||
81 | domain: Env.get('MAILGUN_DOMAIN'), | ||
82 | region: Env.get('MAILGUN_API_REGION'), | ||
83 | apiKey: Env.get('MAILGUN_API_KEY'), | ||
84 | extras: {} | ||
85 | }, | ||
86 | |||
87 | /* | ||
88 | |-------------------------------------------------------------------------- | ||
89 | | Ethereal | ||
90 | |-------------------------------------------------------------------------- | ||
91 | | | ||
92 | | Ethereal driver to quickly test emails in your browser. A disposable | ||
93 | | account is created automatically for you. | ||
94 | | | ||
95 | | https://ethereal.email | ||
96 | | | ||
97 | */ | ||
98 | ethereal: { | ||
99 | driver: 'ethereal' | ||
100 | } | ||
101 | } | ||