Fix missing from in templates

This commit is contained in:
roschaefer 2019-09-06 19:29:10 +02:00
parent 2ca508ba2f
commit 06f07c1a75
3 changed files with 6 additions and 7 deletions

View File

@ -5,8 +5,11 @@ import { signupTemplate } from './templates/signup'
let sendMail let sendMail
if (CONFIG.SMTP_HOST && CONFIG.SMTP_PORT) { if (CONFIG.SMTP_HOST && CONFIG.SMTP_PORT) {
sendMail = async template => { sendMail = async templateArgs => {
await transporter().sendMail(template) await transporter().sendMail({
from: '"Human Connection" <info@human-connection.org>',
...templateArgs,
})
} }
} else { } else {
sendMail = () => {} sendMail = () => {}

View File

@ -1,7 +1,5 @@
import CONFIG from '../../../config' import CONFIG from '../../../config'
export const from = '"Human Connection" <info@human-connection.org>'
export const resetPasswordMail = options => { export const resetPasswordMail = options => {
const { const {
name, name,

View File

@ -1,12 +1,10 @@
import CONFIG from '../../../config' import CONFIG from '../../../config'
export const from = '"Human Connection" <info@human-connection.org>'
export const signupTemplate = options => { export const signupTemplate = options => {
const { const {
email, email,
nonce, nonce,
subject = 'Signup link', subject = 'Welcome to Human Connection! Here is your signup link.',
supportUrl = 'https://human-connection.org/en/contact/', supportUrl = 'https://human-connection.org/en/contact/',
} = options } = options
const actionUrl = new URL('/registration/create-user-account', CONFIG.CLIENT_URI) const actionUrl = new URL('/registration/create-user-account', CONFIG.CLIENT_URI)