-
Notifications
You must be signed in to change notification settings - Fork 7
/
mail.config.js
119 lines (113 loc) · 3.26 KB
/
mail.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
module.exports = {
/*
|--------------------------------------------------------------------------
| Connection
|--------------------------------------------------------------------------
|
| Connection to be used for sending emails. Each connection needs to
| define a driver too.
|
*/
connection: process.env.MAIL_CONNECTION || 'smtp',
/*
|--------------------------------------------------------------------------
| Views
|--------------------------------------------------------------------------
|
| This configuration defines the folder in which all emails are stored.
| If it's not defined, /mails is used as default.
|
*/
views: 'server/mails',
/*
|--------------------------------------------------------------------------
| View engine
|--------------------------------------------------------------------------
|
| This is the view engine that should be used. The currently supported are:
| handlebars, edge
|
*/
viewEngine: 'handlebars',
/*
|--------------------------------------------------------------------------
| SMTP
|--------------------------------------------------------------------------
|
| Here we define configuration for sending emails via SMTP.
|
*/
smtp: {
driver: 'smtp',
pool: true,
port: process.env.MAIL_PORT || 2525,
host: process.env.MAIL_HOST || 'smtp.mailtrap.io',
secure: false,
auth: {
user: process.env.MAIL_USERNAME,
pass: process.env.MAIL_PASSWORD
},
maxConnections: 5,
maxMessages: 100,
rateLimit: 10
},
/*
|--------------------------------------------------------------------------
| SparkPost
|--------------------------------------------------------------------------
|
| Here we define configuration for spark post. Extra options can be defined
| inside the "extra" object.
|
| https://developer.sparkpost.com/api/transmissions.html#header-options-attributes
|
| extras: {
| campaign_id: 'sparkpost campaign id',
| options: { // sparkpost options }
| }
|
*/
sparkpost: {
driver: 'sparkpost',
// endpoint: 'https://api.eu.sparkpost.com/api/v1',
apiKey: process.env.SPARKPOST_API_KEY,
extras: {}
},
/*
|--------------------------------------------------------------------------
| Mailgun
|--------------------------------------------------------------------------
|
| Here we define configuration for mailgun. Extra options can be defined
| inside the "extra" object.
|
| https://mailgun-documentation.readthedocs.io/en/latest/api-sending.html#sending
|
| extras: {
| 'o:tag': '',
| 'o:campaign': '',,
| . . .
| }
|
*/
mailgun: {
driver: 'mailgun',
domain: process.env.MAILGUN_DOMAIN,
apiKey: process.env.MAILGUN_API_KEY,
extras: {}
},
/*
|--------------------------------------------------------------------------
| Ethereal
|--------------------------------------------------------------------------
|
| Ethereal driver to quickly test emails in your browser. A disposable
| account is created automatically for you.
|
| https://ethereal.email
|
*/
ethereal: {
driver: 'ethereal'
}
}