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
if (CONFIG.SMTP_HOST && CONFIG.SMTP_PORT) {
sendMail = async template => {
await transporter().sendMail(template)
sendMail = async templateArgs => {
await transporter().sendMail({
from: '"Human Connection" <info@human-connection.org>',
...templateArgs,
})
}
} else {
sendMail = () => {}

View File

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

View File

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