Fix while sendgrid is being weird

This commit is contained in:
Esther 2020-07-01 16:22:49 +01:00
parent 24af3d179c
commit 534fd6e249
No known key found for this signature in database
GPG Key ID: 162A307C5EBD40EA
2 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,7 @@ Environment=GHOST_KEY=key
Environment=HCAPTCHA_KEY=key
Environment=SENDGRID_API_KEY=key
Environment=TO_MAIL_USER=user
Environment=REPLY_TO_MAIL=user
Environment=FROM_MAIL_USER=user
StandardOutput=syslog
SyslogIdentifier=pastel-codes

View File

@ -25,6 +25,7 @@ router.post('/', contact_rate_limit, (req, res) => {
const TO_MAIL_USER = process.env.TO_MAIL_USER
const FROM_MAIL_USER = process.env.FROM_MAIL_USER
const HCAPTCHA_KEY = process.env.HCAPTCHA_KEY
const REPLY_TO_MAIL = process.env.REPLY_TO_MAIL
const token = req.body["g-recaptcha-response"];
const ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress;
@ -44,7 +45,7 @@ router.post('/', contact_rate_limit, (req, res) => {
res.render('contact', {
message: "I will get back to you soon!",
success: "Make sure the email is from ",
email: TO_MAIL_USER
email: REPLY_TO_MAIL
})
})
.catch(error => {