configurable mailserver and sender
This commit is contained in:
parent
b3d9fb3137
commit
a618eeffeb
|
@ -34,4 +34,4 @@ By default in development mode mails are not sent, but instead the mail data is
|
|||
|
||||
Mails are also always sent in production mode!
|
||||
|
||||
For actually sending e-mails the user and password for the SMTP server need to be specified as environment variables. The username is read from `MAILUSER`, and the password is read from `MAILPW`, so in local development startup would like something like this (at least in Linux): `MAILUSER=myuser MAILPW=supersecurepassword npm run dev -- --devSendMails`.
|
||||
For actually sending e-mails the mailserver, sender, user and password for the SMTP server need to be specified as environment variables. The username is read from `MAILUSER`, and the password is read from `MAILPW`, Mailserver is read from 'MAILSERVER' and the sender name from 'MAILSENDER', so in local development startup would like something like this (at least in Linux): `MAILSERVER=mail.my-domain.de MAILSENDER=noreply@whatever.de MAILUSER=myuser MAILPW=supersecurepassword npm run dev -- --devSendMails`.
|
||||
|
|
|
@ -3,9 +3,9 @@ const forcedMail = process.argv.findIndex(s => s === '--devSendMails') !== -1;
|
|||
|
||||
module.exports = {
|
||||
"sendMails": isProduction || forcedMail,
|
||||
"emailFrom": "noreply@openbikesensor.org",
|
||||
"emailFrom": process.env.MAILSENDER,
|
||||
"smtpOptions": {
|
||||
"host": "mail.your-server.de",
|
||||
"host": process.env.MAILSERVER,
|
||||
"port": 587,
|
||||
"auth": {
|
||||
"user": process.env.MAILUSER,
|
||||
|
|
Loading…
Reference in a new issue