diff --git a/README.md b/README.md index 327ddb4..3f1ff67 100644 --- a/README.md +++ b/README.md @@ -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`. \ No newline at end of file +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`. diff --git a/config/email.js b/config/email.js index 38884d6..12e0fb5 100644 --- a/config/email.js +++ b/config/email.js @@ -3,13 +3,13 @@ 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, "pass": process.env.MAILPW } } -}; \ No newline at end of file +};