mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
refactor(backend): types for global config (#8485)
* refactor(backend): types for global config I saw merge conflicts in these files for #8463 so let's get some parts of this PR into `master` already. I believe this fixes a small bug. They guard clause didn't ensure that all of REDIS_ configurations were set. * remove old email mechanism * refactor(backend: react to @ulfgebhardt's review See: https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/8485#pullrequestreview-2813528327 * build(backend): optional commit @ulfgebhardt this is how I tested the configurations. We don't need to include this commit but I wouldn't expect to send out real emails from a `docker-compose` setup. --------- Co-authored-by: Moriz Wahl <moriz.wahl@gmx.de>
This commit is contained in:
parent
32026dacfc
commit
290a176407
@ -1,8 +1,10 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
|
||||
/* eslint-disable n/no-process-env */
|
||||
import { config } from 'dotenv'
|
||||
// eslint-disable-next-line import/no-namespace
|
||||
import * as SMTPTransport from 'nodemailer/lib/smtp-pool'
|
||||
|
||||
import emails from './emails'
|
||||
import metadata from './metadata'
|
||||
@ -13,16 +15,17 @@ config()
|
||||
// Use Cypress env or process.env
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
declare let Cypress: any | undefined
|
||||
const env = typeof Cypress !== 'undefined' ? Cypress.env() : process.env
|
||||
const env = (typeof Cypress !== 'undefined' ? Cypress.env() : process.env) as typeof process.env
|
||||
|
||||
const environment = {
|
||||
NODE_ENV: env.NODE_ENV || process.env.NODE_ENV,
|
||||
NODE_ENV: env.NODE_ENV ?? process.env.NODE_ENV,
|
||||
DEBUG: env.NODE_ENV !== 'production' && env.DEBUG,
|
||||
TEST: env.NODE_ENV === 'test',
|
||||
PRODUCTION: env.NODE_ENV === 'production',
|
||||
// used for staging enviroments if 'PRODUCTION=true' and 'PRODUCTION_DB_CLEAN_ALLOW=true'
|
||||
PRODUCTION_DB_CLEAN_ALLOW: env.PRODUCTION_DB_CLEAN_ALLOW === 'true' || false, // default = false
|
||||
DISABLED_MIDDLEWARES: ['test', 'development'].includes(env.NODE_ENV as string)
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
DISABLED_MIDDLEWARES: ['test', 'development'].includes(env.NODE_ENV!)
|
||||
? (env.DISABLED_MIDDLEWARES?.split(',') ?? [])
|
||||
: [],
|
||||
SEND_MAIL: env.NODE_ENV !== 'test',
|
||||
@ -35,32 +38,51 @@ const required = {
|
||||
}
|
||||
|
||||
const server = {
|
||||
CLIENT_URI: env.CLIENT_URI || 'http://localhost:3000',
|
||||
GRAPHQL_URI: env.GRAPHQL_URI || 'http://localhost:4000',
|
||||
JWT_EXPIRES: env.JWT_EXPIRES || '2y',
|
||||
CLIENT_URI: env.CLIENT_URI ?? 'http://localhost:3000',
|
||||
GRAPHQL_URI: env.GRAPHQL_URI ?? 'http://localhost:4000',
|
||||
JWT_EXPIRES: env.JWT_EXPIRES ?? '2y',
|
||||
}
|
||||
|
||||
const hasDKIMData = env.SMTP_DKIM_DOMAINNAME && env.SMTP_DKIM_KEYSELECTOR && env.SMTP_DKIM_PRIVATKEY
|
||||
const SMTP_HOST = env.SMTP_HOST
|
||||
const SMTP_PORT = (env.SMTP_PORT && parseInt(env.SMTP_PORT)) || undefined
|
||||
const SMTP_IGNORE_TLS = env.SMTP_IGNORE_TLS !== 'false' // default = true
|
||||
const SMTP_SECURE = env.SMTP_SECURE === 'true'
|
||||
const SMTP_USERNAME = env.SMTP_USERNAME
|
||||
const SMTP_PASSWORD = env.SMTP_PASSWORD
|
||||
const SMTP_DKIM_DOMAINNAME = env.SMTP_DKIM_DOMAINNAME
|
||||
const SMTP_DKIM_KEYSELECTOR = env.SMTP_DKIM_KEYSELECTOR
|
||||
// PEM format = https://docs.progress.com/bundle/datadirect-hybrid-data-pipeline-installation-46/page/PEM-file-format.html
|
||||
const SMTP_DKIM_PRIVATKEY = env.SMTP_DKIM_PRIVATKEY?.replace(/\\n/g, '\n') // replace all "\n" in .env string by real line break
|
||||
const SMTP_MAX_CONNECTIONS = (env.SMTP_MAX_CONNECTIONS && parseInt(env.SMTP_MAX_CONNECTIONS)) || 5
|
||||
const SMTP_MAX_MESSAGES = (env.SMTP_MAX_MESSAGES && parseInt(env.SMTP_MAX_MESSAGES)) || 100
|
||||
|
||||
const smtp = {
|
||||
SMTP_HOST: env.SMTP_HOST,
|
||||
SMTP_PORT: env.SMTP_PORT,
|
||||
SMTP_IGNORE_TLS: env.SMTP_IGNORE_TLS !== 'false', // default = true
|
||||
SMTP_SECURE: env.SMTP_SECURE === 'true',
|
||||
SMTP_USERNAME: env.SMTP_USERNAME,
|
||||
SMTP_PASSWORD: env.SMTP_PASSWORD,
|
||||
SMTP_DKIM_DOMAINNAME: hasDKIMData && env.SMTP_DKIM_DOMAINNAME,
|
||||
SMTP_DKIM_KEYSELECTOR: hasDKIMData && env.SMTP_DKIM_KEYSELECTOR,
|
||||
// PEM format: https://docs.progress.com/bundle/datadirect-hybrid-data-pipeline-installation-46/page/PEM-file-format.html
|
||||
SMTP_DKIM_PRIVATKEY: hasDKIMData && env.SMTP_DKIM_PRIVATKEY.replace(/\\n/g, '\n'), // replace all "\n" in .env string by real line break
|
||||
SMTP_MAX_CONNECTIONS: env.SMTP_MAX_CONNECTIONS || 5,
|
||||
SMTP_MAX_MESSAGES: env.SMTP_MAX_MESSAGES || 100,
|
||||
const nodemailerTransportOptions: SMTPTransport.Options = {
|
||||
host: SMTP_HOST,
|
||||
port: SMTP_PORT,
|
||||
ignoreTLS: SMTP_IGNORE_TLS,
|
||||
secure: SMTP_SECURE, // true for 465, false for other ports
|
||||
pool: true,
|
||||
maxConnections: SMTP_MAX_CONNECTIONS,
|
||||
maxMessages: SMTP_MAX_MESSAGES,
|
||||
}
|
||||
if (SMTP_USERNAME && SMTP_PASSWORD) {
|
||||
nodemailerTransportOptions.auth = {
|
||||
user: SMTP_USERNAME,
|
||||
pass: SMTP_PASSWORD,
|
||||
}
|
||||
}
|
||||
if (SMTP_DKIM_DOMAINNAME && SMTP_DKIM_KEYSELECTOR && SMTP_DKIM_PRIVATKEY) {
|
||||
nodemailerTransportOptions.dkim = {
|
||||
domainName: SMTP_DKIM_DOMAINNAME,
|
||||
keySelector: SMTP_DKIM_KEYSELECTOR,
|
||||
privateKey: SMTP_DKIM_PRIVATKEY,
|
||||
}
|
||||
}
|
||||
|
||||
const neo4j = {
|
||||
NEO4J_URI: env.NEO4J_URI || 'bolt://localhost:7687',
|
||||
NEO4J_USERNAME: env.NEO4J_USERNAME || 'neo4j',
|
||||
NEO4J_PASSWORD: env.NEO4J_PASSWORD || 'neo4j',
|
||||
NEO4J_URI: env.NEO4J_URI ?? 'bolt://localhost:7687',
|
||||
NEO4J_USERNAME: env.NEO4J_USERNAME ?? 'neo4j',
|
||||
NEO4J_PASSWORD: env.NEO4J_PASSWORD ?? 'neo4j',
|
||||
}
|
||||
|
||||
const sentry = {
|
||||
@ -70,7 +92,7 @@ const sentry = {
|
||||
|
||||
const redis = {
|
||||
REDIS_DOMAIN: env.REDIS_DOMAIN,
|
||||
REDIS_PORT: env.REDIS_PORT,
|
||||
REDIS_PORT: (env.REDIS_PORT && parseInt(env.REDIS_PORT)) || undefined,
|
||||
REDIS_PASSWORD: env.REDIS_PASSWORD,
|
||||
}
|
||||
|
||||
@ -110,10 +132,11 @@ export default {
|
||||
...environment,
|
||||
...server,
|
||||
...required,
|
||||
...smtp,
|
||||
...neo4j,
|
||||
...sentry,
|
||||
...redis,
|
||||
...s3,
|
||||
...options,
|
||||
}
|
||||
|
||||
export { nodemailerTransportOptions }
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
import { RedisPubSub } from 'graphql-redis-subscriptions'
|
||||
import { PubSub } from 'graphql-subscriptions'
|
||||
import Redis from 'ioredis'
|
||||
@ -6,14 +5,15 @@ import Redis from 'ioredis'
|
||||
import CONFIG from '@config/index'
|
||||
|
||||
export default () => {
|
||||
if (!CONFIG.REDIS_DOMAIN || CONFIG.REDIS_PORT || CONFIG.REDIS_PASSWORD) {
|
||||
const { REDIS_DOMAIN, REDIS_PORT, REDIS_PASSWORD } = CONFIG
|
||||
if (!(REDIS_DOMAIN && REDIS_PORT && REDIS_PASSWORD)) {
|
||||
return new PubSub()
|
||||
}
|
||||
|
||||
const options = {
|
||||
host: CONFIG.REDIS_DOMAIN,
|
||||
port: CONFIG.REDIS_PORT,
|
||||
password: CONFIG.REDIS_PASSWORD,
|
||||
host: REDIS_DOMAIN,
|
||||
port: REDIS_PORT,
|
||||
password: REDIS_PASSWORD,
|
||||
retryStrategy: (times) => {
|
||||
return Math.min(times * 50, 2000)
|
||||
},
|
||||
|
||||
@ -1,117 +0,0 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
/* eslint-disable security/detect-non-literal-fs-filename */
|
||||
import https from 'https'
|
||||
import { existsSync, createReadStream } from 'node:fs'
|
||||
import path from 'node:path'
|
||||
|
||||
import { S3 } from 'aws-sdk'
|
||||
import mime from 'mime-types'
|
||||
|
||||
import s3Configs from '@config/index'
|
||||
import { getDriver } from '@db/neo4j'
|
||||
|
||||
export const description = `
|
||||
Upload all image files to a S3 compatible object storage in order to reduce
|
||||
load on our backend.
|
||||
`
|
||||
|
||||
export async function up(next) {
|
||||
const driver = getDriver()
|
||||
const session = driver.session()
|
||||
const transaction = session.beginTransaction()
|
||||
const agent = new https.Agent({
|
||||
maxSockets: 5,
|
||||
})
|
||||
|
||||
const {
|
||||
AWS_ENDPOINT: endpoint,
|
||||
AWS_REGION: region,
|
||||
AWS_BUCKET: Bucket,
|
||||
S3_CONFIGURED,
|
||||
} = s3Configs
|
||||
|
||||
if (!S3_CONFIGURED) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('No S3 given, cannot upload image files')
|
||||
return
|
||||
}
|
||||
|
||||
const s3 = new S3({ region, endpoint, httpOptions: { agent } })
|
||||
try {
|
||||
// Implement your migration here.
|
||||
const { records } = await transaction.run('MATCH (image:Image) RETURN image.url as url')
|
||||
let urls = records.map((r) => r.get('url'))
|
||||
urls = urls.filter((url) => url.startsWith('/uploads'))
|
||||
const locations = await Promise.all(
|
||||
urls
|
||||
.map((url) => {
|
||||
return async () => {
|
||||
const { pathname } = new URL(url, 'http://example.org')
|
||||
const fileLocation = path.join(__dirname, `../../../public/${pathname}`)
|
||||
const s3Location = `original${pathname}`
|
||||
// eslint-disable-next-line n/no-sync
|
||||
if (existsSync(fileLocation)) {
|
||||
const mimeType = mime.lookup(fileLocation)
|
||||
const params = {
|
||||
Bucket,
|
||||
Key: s3Location,
|
||||
ACL: 'public-read',
|
||||
ContentType: mimeType || 'image/jpeg',
|
||||
Body: createReadStream(fileLocation),
|
||||
}
|
||||
|
||||
const data = await s3.upload(params).promise()
|
||||
const { Location: spacesUrl } = data
|
||||
|
||||
const updatedRecord = await transaction.run(
|
||||
'MATCH (image:Image {url: $url}) SET image.url = $spacesUrl RETURN image.url as url',
|
||||
{ url, spacesUrl },
|
||||
)
|
||||
const [updatedUrl] = updatedRecord.records.map((record) => record.get('url'))
|
||||
return updatedUrl
|
||||
}
|
||||
}
|
||||
})
|
||||
.map((p) => p()),
|
||||
)
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('this is locations', locations)
|
||||
await transaction.commit()
|
||||
next()
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(error)
|
||||
await transaction.rollback()
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('rolled back')
|
||||
throw new Error(error)
|
||||
} finally {
|
||||
await session.close()
|
||||
}
|
||||
}
|
||||
|
||||
export async function down(next) {
|
||||
const driver = getDriver()
|
||||
const session = driver.session()
|
||||
const transaction = session.beginTransaction()
|
||||
|
||||
try {
|
||||
// Implement your migration here.
|
||||
await transaction.run(``)
|
||||
await transaction.commit()
|
||||
next()
|
||||
// eslint-disable-next-line no-catch-all/no-catch-all
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(error)
|
||||
await transaction.rollback()
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('rolled back')
|
||||
} finally {
|
||||
await session.close()
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,3 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
/* eslint-disable import/no-named-as-default-member */
|
||||
import neo4j, { Driver } from 'neo4j-driver'
|
||||
import Neode from 'neode'
|
||||
|
||||
@ -7,17 +7,14 @@ import path from 'node:path'
|
||||
|
||||
import Email from 'email-templates'
|
||||
import { createTransport } from 'nodemailer'
|
||||
|
||||
// import type Email as EmailType from '@types/email-templates'
|
||||
|
||||
import CONFIG from '@config/index'
|
||||
import CONFIG, { nodemailerTransportOptions } from '@config/index'
|
||||
import logosWebapp from '@config/logos'
|
||||
import metadata from '@config/metadata'
|
||||
import { UserDbProperties } from '@db/types/User'
|
||||
|
||||
const hasAuthData = CONFIG.SMTP_USERNAME && CONFIG.SMTP_PASSWORD
|
||||
const hasDKIMData =
|
||||
CONFIG.SMTP_DKIM_DOMAINNAME && CONFIG.SMTP_DKIM_KEYSELECTOR && CONFIG.SMTP_DKIM_PRIVATKEY
|
||||
|
||||
const welcomeImageUrl = new URL(logosWebapp.LOGO_WELCOME_PATH, CONFIG.CLIENT_URI)
|
||||
const settingsUrl = new URL('/settings/notifications', CONFIG.CLIENT_URI)
|
||||
|
||||
@ -31,24 +28,7 @@ const defaultParams = {
|
||||
renderSettingsUrl: true,
|
||||
}
|
||||
|
||||
export const transport = createTransport({
|
||||
host: CONFIG.SMTP_HOST,
|
||||
port: CONFIG.SMTP_PORT,
|
||||
ignoreTLS: CONFIG.SMTP_IGNORE_TLS,
|
||||
secure: CONFIG.SMTP_SECURE, // true for 465, false for other ports
|
||||
pool: true,
|
||||
maxConnections: CONFIG.SMTP_MAX_CONNECTIONS,
|
||||
maxMessages: CONFIG.SMTP_MAX_MESSAGES,
|
||||
auth: hasAuthData && {
|
||||
user: CONFIG.SMTP_USERNAME,
|
||||
pass: CONFIG.SMTP_PASSWORD,
|
||||
},
|
||||
dkim: hasDKIMData && {
|
||||
domainName: CONFIG.SMTP_DKIM_DOMAINNAME,
|
||||
keySelector: CONFIG.SMTP_DKIM_KEYSELECTOR,
|
||||
privateKey: CONFIG.SMTP_DKIM_PRIVATKEY,
|
||||
},
|
||||
})
|
||||
const transport = createTransport(nodemailerTransportOptions)
|
||||
|
||||
const email = new Email({
|
||||
message: {
|
||||
|
||||
@ -138,6 +138,9 @@ const s3Upload = async ({ createReadStream, uniqueFilename, mimetype }) => {
|
||||
const s3 = new S3({ region, endpoint })
|
||||
const s3Location = `original/${uniqueFilename}`
|
||||
|
||||
if (!Bucket) {
|
||||
throw new Error('AWS_BUCKET is undefined')
|
||||
}
|
||||
const params = {
|
||||
Bucket,
|
||||
Key: s3Location,
|
||||
@ -160,6 +163,9 @@ const s3Delete = async (url) => {
|
||||
const s3 = new S3({ region, endpoint })
|
||||
let { pathname } = new URL(url, 'http://example.org') // dummy domain to avoid invalid URL error
|
||||
pathname = pathname.substring(1) // remove first character '/'
|
||||
if (!Bucket) {
|
||||
throw new Error('AWS_BUCKET is undefined')
|
||||
}
|
||||
const params = {
|
||||
Bucket,
|
||||
Key: pathname,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
|
||||
import CONFIG from './config'
|
||||
import createServer from './server'
|
||||
|
||||
|
||||
@ -1,80 +0,0 @@
|
||||
/* eslint-disable @typescript-eslint/require-await */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/restrict-plus-operands */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
import { createTransport } from 'nodemailer'
|
||||
import { htmlToText } from 'nodemailer-html-to-text'
|
||||
|
||||
import CONFIG from '@config/index'
|
||||
import { cleanHtml } from '@middleware/helpers/cleanHtml'
|
||||
|
||||
const hasEmailConfig = CONFIG.SMTP_HOST && CONFIG.SMTP_PORT
|
||||
const hasAuthData = CONFIG.SMTP_USERNAME && CONFIG.SMTP_PASSWORD
|
||||
const hasDKIMData =
|
||||
CONFIG.SMTP_DKIM_DOMAINNAME && CONFIG.SMTP_DKIM_KEYSELECTOR && CONFIG.SMTP_DKIM_PRIVATKEY
|
||||
|
||||
const transporter = createTransport({
|
||||
host: CONFIG.SMTP_HOST,
|
||||
port: CONFIG.SMTP_PORT,
|
||||
ignoreTLS: CONFIG.SMTP_IGNORE_TLS,
|
||||
secure: CONFIG.SMTP_SECURE, // true for 465, false for other ports
|
||||
pool: true,
|
||||
maxConnections: CONFIG.SMTP_MAX_CONNECTIONS,
|
||||
maxMessages: CONFIG.SMTP_MAX_MESSAGES,
|
||||
auth: hasAuthData && {
|
||||
user: CONFIG.SMTP_USERNAME,
|
||||
pass: CONFIG.SMTP_PASSWORD,
|
||||
},
|
||||
dkim: hasDKIMData && {
|
||||
domainName: CONFIG.SMTP_DKIM_DOMAINNAME,
|
||||
keySelector: CONFIG.SMTP_DKIM_KEYSELECTOR,
|
||||
privateKey: CONFIG.SMTP_DKIM_PRIVATKEY,
|
||||
},
|
||||
})
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-empty-function
|
||||
let sendMailCallback: any = async () => {}
|
||||
if (!hasEmailConfig) {
|
||||
if (!CONFIG.TEST) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Warning: Middlewares will not try to send mails.')
|
||||
// TODO: disable e-mail logging on database seeding?
|
||||
// TODO: implement general logging like 'log4js', see Gradido project: https://github.com/gradido/gradido/blob/master/backend/log4js-config.json
|
||||
sendMailCallback = async (templateArgs) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('--- Log Unsend E-Mail ---')
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('To: ' + templateArgs.to)
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('From: ' + templateArgs.from)
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Subject: ' + templateArgs.subject)
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Content:')
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
cleanHtml(templateArgs.html, 'dummyKey', {
|
||||
allowedTags: ['a'],
|
||||
allowedAttributes: { a: ['href'] },
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
} as any).replace(/&/g, '&'),
|
||||
)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sendMailCallback = async (templateArgs) => {
|
||||
transporter.use(
|
||||
'compile',
|
||||
htmlToText({
|
||||
ignoreImage: true,
|
||||
wordwrap: false,
|
||||
}),
|
||||
)
|
||||
|
||||
await transporter.sendMail(templateArgs)
|
||||
}
|
||||
}
|
||||
|
||||
export const sendMail = sendMailCallback
|
||||
@ -1,283 +0,0 @@
|
||||
/* eslint-disable @typescript-eslint/require-await */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
import CONFIG from '@config/index'
|
||||
import logosWebapp from '@config/logos'
|
||||
|
||||
import {
|
||||
signupTemplate,
|
||||
emailVerificationTemplate,
|
||||
resetPasswordTemplate,
|
||||
wrongAccountTemplate,
|
||||
notificationTemplate,
|
||||
chatMessageTemplate,
|
||||
} from './templateBuilder'
|
||||
|
||||
const englishHint = 'English version below!'
|
||||
const welcomeImageUrl = new URL(logosWebapp.LOGO_WELCOME_PATH, CONFIG.CLIENT_URI)
|
||||
const supportUrl = CONFIG.SUPPORT_URL.toString()
|
||||
let actionUrl, name, settingsUrl
|
||||
|
||||
const signupTemplateData = () => ({
|
||||
email: 'test@example.org',
|
||||
variables: {
|
||||
nonce: '12345',
|
||||
inviteCode: 'AAAAAA',
|
||||
},
|
||||
})
|
||||
const emailVerificationTemplateData = () => ({
|
||||
email: 'test@example.org',
|
||||
variables: {
|
||||
nonce: '12345',
|
||||
name: 'Mr Example',
|
||||
},
|
||||
})
|
||||
const resetPasswordTemplateData = () => ({
|
||||
email: 'test@example.org',
|
||||
variables: {
|
||||
nonce: '12345',
|
||||
name: 'Mr Example',
|
||||
},
|
||||
})
|
||||
const chatMessageTemplateData = {
|
||||
email: 'test@example.org',
|
||||
variables: {
|
||||
senderUser: {
|
||||
name: 'Sender',
|
||||
},
|
||||
recipientUser: {
|
||||
name: 'Recipient',
|
||||
},
|
||||
},
|
||||
}
|
||||
const wrongAccountTemplateData = () => ({
|
||||
email: 'test@example.org',
|
||||
variables: {},
|
||||
})
|
||||
const notificationTemplateData = (locale) => ({
|
||||
email: 'test@example.org',
|
||||
variables: {
|
||||
notification: {
|
||||
to: { name: 'Mr Example', locale },
|
||||
},
|
||||
},
|
||||
})
|
||||
const textsStandard = [
|
||||
{
|
||||
templPropName: 'from',
|
||||
isContaining: false,
|
||||
text: CONFIG.EMAIL_DEFAULT_SENDER,
|
||||
},
|
||||
{
|
||||
templPropName: 'to',
|
||||
isContaining: false,
|
||||
text: 'test@example.org',
|
||||
},
|
||||
// is contained in html
|
||||
welcomeImageUrl.toString(),
|
||||
CONFIG.ORGANIZATION_URL,
|
||||
CONFIG.APPLICATION_NAME,
|
||||
]
|
||||
const testEmailData = (emailTemplate, templateBuilder, templateData, texts) => {
|
||||
if (!emailTemplate) {
|
||||
emailTemplate = templateBuilder(templateData)
|
||||
}
|
||||
texts.forEach((element) => {
|
||||
if (typeof element === 'object') {
|
||||
if (element.isContaining) {
|
||||
expect(emailTemplate[element.templPropName]).toEqual(expect.stringContaining(element.text))
|
||||
} else {
|
||||
expect(emailTemplate[element.templPropName]).toEqual(element.text)
|
||||
}
|
||||
} else {
|
||||
expect(emailTemplate.html).toEqual(expect.stringContaining(element))
|
||||
}
|
||||
})
|
||||
return emailTemplate
|
||||
}
|
||||
|
||||
describe('templateBuilder', () => {
|
||||
describe('signupTemplate', () => {
|
||||
describe('multi language', () => {
|
||||
it('e-mail is build with all data', () => {
|
||||
const subject = `Willkommen, Bienvenue, Welcome to ${CONFIG.APPLICATION_NAME}!`
|
||||
const actionUrl = new URL('/registration', CONFIG.CLIENT_URI).toString()
|
||||
const theSignupTemplateData = signupTemplateData()
|
||||
const enContent = "Thank you for joining our cause – it's awesome to have you on board."
|
||||
const deContent =
|
||||
'Danke, dass Du dich angemeldet hast – wir freuen uns, Dich dabei zu haben.'
|
||||
testEmailData(null, signupTemplate, theSignupTemplateData, [
|
||||
...textsStandard,
|
||||
{
|
||||
templPropName: 'subject',
|
||||
isContaining: false,
|
||||
text: subject,
|
||||
},
|
||||
englishHint,
|
||||
actionUrl,
|
||||
theSignupTemplateData.variables.nonce,
|
||||
theSignupTemplateData.variables.inviteCode,
|
||||
enContent,
|
||||
deContent,
|
||||
supportUrl,
|
||||
])
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('emailVerificationTemplate', () => {
|
||||
describe('multi language', () => {
|
||||
it('e-mail is build with all data', () => {
|
||||
const subject = 'Neue E-Mail Adresse | New E-Mail Address'
|
||||
const actionUrl = new URL('/settings/my-email-address/verify', CONFIG.CLIENT_URI).toString()
|
||||
const theEmailVerificationTemplateData = emailVerificationTemplateData()
|
||||
const enContent = 'So, you want to change your e-mail? No problem!'
|
||||
const deContent = 'Du möchtest also deine E-Mail ändern? Kein Problem!'
|
||||
testEmailData(null, emailVerificationTemplate, theEmailVerificationTemplateData, [
|
||||
...textsStandard,
|
||||
{
|
||||
templPropName: 'subject',
|
||||
isContaining: false,
|
||||
text: subject,
|
||||
},
|
||||
englishHint,
|
||||
actionUrl,
|
||||
theEmailVerificationTemplateData.variables.nonce,
|
||||
theEmailVerificationTemplateData.variables.name,
|
||||
enContent,
|
||||
deContent,
|
||||
supportUrl,
|
||||
])
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('resetPasswordTemplate', () => {
|
||||
describe('multi language', () => {
|
||||
it('e-mail is build with all data', () => {
|
||||
const subject = 'Neues Passwort | Reset Password'
|
||||
const actionUrl = new URL('/password-reset/change-password', CONFIG.CLIENT_URI).toString()
|
||||
const theResetPasswordTemplateData = resetPasswordTemplateData()
|
||||
const enContent = 'So, you forgot your password? No problem!'
|
||||
const deContent = 'Du hast also dein Passwort vergessen? Kein Problem!'
|
||||
testEmailData(null, resetPasswordTemplate, theResetPasswordTemplateData, [
|
||||
...textsStandard,
|
||||
{
|
||||
templPropName: 'subject',
|
||||
isContaining: false,
|
||||
text: subject,
|
||||
},
|
||||
englishHint,
|
||||
actionUrl,
|
||||
theResetPasswordTemplateData.variables.nonce,
|
||||
theResetPasswordTemplateData.variables.name,
|
||||
enContent,
|
||||
deContent,
|
||||
supportUrl,
|
||||
])
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('chatMessageTemplate', () => {
|
||||
describe('multi language', () => {
|
||||
it('e-mail is build with all data', () => {
|
||||
const subject = `Neue Chat-Nachricht | New chat message - ${chatMessageTemplateData.variables.senderUser.name}`
|
||||
const actionUrl = new URL('/chat', CONFIG.CLIENT_URI).toString()
|
||||
const enContent = `You have received a new chat message from <b>${chatMessageTemplateData.variables.senderUser.name}</b>.`
|
||||
const deContent = `Du hast eine neue Chat-Nachricht von <b>${chatMessageTemplateData.variables.senderUser.name}</b> erhalten.`
|
||||
testEmailData(null, chatMessageTemplate, chatMessageTemplateData, [
|
||||
...textsStandard,
|
||||
{
|
||||
templPropName: 'subject',
|
||||
isContaining: false,
|
||||
text: subject,
|
||||
},
|
||||
englishHint,
|
||||
actionUrl,
|
||||
chatMessageTemplateData.variables.senderUser,
|
||||
chatMessageTemplateData.variables.recipientUser,
|
||||
enContent,
|
||||
deContent,
|
||||
supportUrl,
|
||||
])
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('wrongAccountTemplate', () => {
|
||||
describe('multi language', () => {
|
||||
it('e-mail is build with all data', () => {
|
||||
const subject = 'Falsche Mailadresse? | Wrong E-mail?'
|
||||
const actionUrl = new URL('/password-reset/request', CONFIG.CLIENT_URI).toString()
|
||||
const theWrongAccountTemplateData = wrongAccountTemplateData()
|
||||
const enContent =
|
||||
"You requested a password reset but unfortunately we couldn't find an account associated with your e-mail address."
|
||||
const deContent =
|
||||
'Du hast bei uns ein neues Passwort angefordert – leider haben wir aber keinen Account mit Deiner E-Mailadresse gefunden.'
|
||||
testEmailData(null, wrongAccountTemplate, theWrongAccountTemplateData, [
|
||||
...textsStandard,
|
||||
{
|
||||
templPropName: 'subject',
|
||||
isContaining: false,
|
||||
text: subject,
|
||||
},
|
||||
englishHint,
|
||||
actionUrl,
|
||||
enContent,
|
||||
deContent,
|
||||
supportUrl,
|
||||
])
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('notificationTemplate', () => {
|
||||
beforeEach(() => {
|
||||
actionUrl = new URL('/notifications', CONFIG.CLIENT_URI).toString()
|
||||
name = notificationTemplateData('en').variables.notification.to.name
|
||||
settingsUrl = new URL('/settings/notifications', CONFIG.CLIENT_URI)
|
||||
})
|
||||
|
||||
describe('en', () => {
|
||||
it('e-mail is build with all data', () => {
|
||||
const subject = `${CONFIG.APPLICATION_NAME} – Notification`
|
||||
const content = 'You received at least one notification. Click on this button to view them:'
|
||||
testEmailData(null, notificationTemplate, notificationTemplateData('en'), [
|
||||
...textsStandard,
|
||||
{
|
||||
templPropName: 'subject',
|
||||
isContaining: false,
|
||||
text: subject,
|
||||
},
|
||||
actionUrl,
|
||||
name,
|
||||
content,
|
||||
settingsUrl,
|
||||
])
|
||||
})
|
||||
})
|
||||
|
||||
describe('de', () => {
|
||||
it('e-mail is build with all data', async () => {
|
||||
const subject = `${CONFIG.APPLICATION_NAME} – Benachrichtigung`
|
||||
const content = `Du hast mindestens eine Benachrichtigung erhalten. Klick auf diesen Button, um sie anzusehen:`
|
||||
testEmailData(null, notificationTemplate, notificationTemplateData('de'), [
|
||||
...textsStandard,
|
||||
{
|
||||
templPropName: 'subject',
|
||||
isContaining: false,
|
||||
text: subject,
|
||||
},
|
||||
actionUrl,
|
||||
name,
|
||||
content,
|
||||
settingsUrl,
|
||||
])
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
@ -1,140 +0,0 @@
|
||||
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
/* eslint-disable import/no-namespace */
|
||||
import mustache from 'mustache'
|
||||
|
||||
import CONFIG from '@config/index'
|
||||
import logosWebapp from '@config/logos'
|
||||
import metadata from '@config/metadata'
|
||||
|
||||
import * as templates from './templates'
|
||||
import * as templatesDE from './templates/de'
|
||||
import * as templatesEN from './templates/en'
|
||||
|
||||
const from = CONFIG.EMAIL_DEFAULT_SENDER
|
||||
const welcomeImageUrl = new URL(logosWebapp.LOGO_WELCOME_PATH, CONFIG.CLIENT_URI)
|
||||
|
||||
const defaultParams = {
|
||||
welcomeImageUrl,
|
||||
APPLICATION_NAME: CONFIG.APPLICATION_NAME,
|
||||
ORGANIZATION_NAME: metadata.ORGANIZATION_NAME,
|
||||
ORGANIZATION_URL: CONFIG.ORGANIZATION_URL,
|
||||
supportUrl: CONFIG.SUPPORT_URL,
|
||||
}
|
||||
const englishHint = 'English version below!'
|
||||
|
||||
export const signupTemplate = ({ email, variables: { nonce, inviteCode = null } }) => {
|
||||
const subject = `Willkommen, Bienvenue, Welcome to ${CONFIG.APPLICATION_NAME}!`
|
||||
// dev format example: http://localhost:3000/registration?method=invite-mail&email=huss%40pjannto.com&nonce=64853
|
||||
const actionUrl = new URL('/registration', CONFIG.CLIENT_URI)
|
||||
actionUrl.searchParams.set('email', email)
|
||||
actionUrl.searchParams.set('nonce', nonce)
|
||||
if (inviteCode) {
|
||||
actionUrl.searchParams.set('inviteCode', inviteCode)
|
||||
actionUrl.searchParams.set('method', 'invite-code')
|
||||
} else {
|
||||
actionUrl.searchParams.set('method', 'invite-mail')
|
||||
}
|
||||
const renderParams = { ...defaultParams, englishHint, actionUrl, nonce, subject }
|
||||
|
||||
return {
|
||||
from,
|
||||
to: email,
|
||||
subject,
|
||||
html: mustache.render(templates.layout, renderParams, { content: templates.signup }),
|
||||
}
|
||||
}
|
||||
|
||||
export const emailVerificationTemplate = ({ email, variables: { nonce, name } }) => {
|
||||
const subject = 'Neue E-Mail Adresse | New E-Mail Address'
|
||||
const actionUrl = new URL('/settings/my-email-address/verify', CONFIG.CLIENT_URI)
|
||||
actionUrl.searchParams.set('email', email)
|
||||
actionUrl.searchParams.set('nonce', nonce)
|
||||
const renderParams = { ...defaultParams, englishHint, actionUrl, name, nonce, subject }
|
||||
|
||||
return {
|
||||
from,
|
||||
to: email,
|
||||
subject,
|
||||
html: mustache.render(templates.layout, renderParams, { content: templates.emailVerification }),
|
||||
}
|
||||
}
|
||||
|
||||
export const resetPasswordTemplate = ({ email, variables: { nonce, name } }) => {
|
||||
const subject = 'Neues Passwort | Reset Password'
|
||||
const actionUrl = new URL('/password-reset/change-password', CONFIG.CLIENT_URI)
|
||||
actionUrl.searchParams.set('nonce', nonce)
|
||||
actionUrl.searchParams.set('email', email)
|
||||
const renderParams = { ...defaultParams, englishHint, actionUrl, name, nonce, subject }
|
||||
|
||||
return {
|
||||
from,
|
||||
to: email,
|
||||
subject,
|
||||
html: mustache.render(templates.layout, renderParams, { content: templates.passwordReset }),
|
||||
}
|
||||
}
|
||||
|
||||
export const chatMessageTemplate = ({ email, variables: { senderUser, recipientUser } }) => {
|
||||
const subject = `Neue Chat-Nachricht | New chat message - ${senderUser.name}`
|
||||
const actionUrl = new URL('/chat', CONFIG.CLIENT_URI)
|
||||
const renderParams = {
|
||||
...defaultParams,
|
||||
subject,
|
||||
englishHint,
|
||||
actionUrl,
|
||||
senderUser,
|
||||
recipientUser,
|
||||
}
|
||||
|
||||
return {
|
||||
from,
|
||||
to: email,
|
||||
subject,
|
||||
html: mustache.render(templates.layout, renderParams, { content: templates.chatMessage }),
|
||||
}
|
||||
}
|
||||
|
||||
export const wrongAccountTemplate = ({ email, _variables = {} }) => {
|
||||
const subject = 'Falsche Mailadresse? | Wrong E-mail?'
|
||||
const actionUrl = new URL('/password-reset/request', CONFIG.CLIENT_URI)
|
||||
const renderParams = { ...defaultParams, englishHint, actionUrl }
|
||||
|
||||
return {
|
||||
from,
|
||||
to: email,
|
||||
subject,
|
||||
html: mustache.render(templates.layout, renderParams, { content: templates.wrongAccount }),
|
||||
}
|
||||
}
|
||||
|
||||
export const notificationTemplate = ({ email, variables: { notification } }) => {
|
||||
const actionUrl = new URL('/notifications', CONFIG.CLIENT_URI)
|
||||
const settingsUrl = new URL('/settings/notifications', CONFIG.CLIENT_URI)
|
||||
const renderParams = { ...defaultParams, name: notification.to.name, settingsUrl, actionUrl }
|
||||
let content
|
||||
switch (notification.to.locale) {
|
||||
case 'de':
|
||||
content = templatesDE.notification
|
||||
break
|
||||
case 'en':
|
||||
content = templatesEN.notification
|
||||
break
|
||||
|
||||
default:
|
||||
content = templatesEN.notification
|
||||
break
|
||||
}
|
||||
const subjectUnrendered = content.split('\n')[0].split('"')[1]
|
||||
const subject = mustache.render(subjectUnrendered, renderParams, {})
|
||||
|
||||
return {
|
||||
from,
|
||||
to: email,
|
||||
subject,
|
||||
html: mustache.render(templates.layout, renderParams, { content }),
|
||||
}
|
||||
}
|
||||
@ -1,105 +0,0 @@
|
||||
<!-- Email Body German : BEGIN -->
|
||||
<table class="email-german" align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%"
|
||||
style="margin: auto;">
|
||||
|
||||
<!-- Hero Image, Flush : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff;">
|
||||
<img
|
||||
src="{{{ welcomeImageUrl }}}"
|
||||
width="300" height="" alt="Welcome image" border="0"
|
||||
style="width: 100%; max-width: 300px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block; padding: 20px;"
|
||||
class="g-img">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Hero Image, Flush : END -->
|
||||
|
||||
<!-- 1 Column Text + Button : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; padding-top: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<h1
|
||||
style="margin: 0 0 10px 0; font-family: Lato, sans-serif; font-size: 25px; line-height: 30px; color: #333333; font-weight: normal;">
|
||||
Hallo {{ recipientUser.name }}!</h1>
|
||||
<p style="margin: 0;">Du hast eine neue Chat-Nachricht von <b>{{ senderUser.name }}</b> erhalten.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 0 20px;">
|
||||
<!-- Button : BEGIN -->
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" style="margin: auto;">
|
||||
<tr>
|
||||
<td class="button-td button-td-primary" style="border-radius: 4px; background: #17b53e;">
|
||||
<a class="button-a button-a-primary" href="{{{ actionUrl }}}"
|
||||
style="background: #17b53e; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; text-decoration: none; padding: 13px 17px; color: #ffffff; display: block; border-radius: 4px;">Chat anzeigen</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- Button : END -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text + Button : END -->
|
||||
|
||||
</table>
|
||||
<!-- Email Body German : END -->
|
||||
|
||||
<!-- Email Body English : BEGIN -->
|
||||
<table class="email-english" align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%"
|
||||
style="margin: auto;">
|
||||
<tr>
|
||||
<td style="padding: 20px 0; text-align: center">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Hero Image, Flush : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff;">
|
||||
<img
|
||||
src="{{{ welcomeImageUrl }}}"
|
||||
width="300" height="" alt="Welcome image" border="0"
|
||||
style="width: 100%; max-width: 300px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block; padding: 20px;"
|
||||
class="g-img">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Hero Image, Flush : END -->
|
||||
|
||||
<!-- 1 Column Text + Button : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; padding-top: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<h1
|
||||
style="margin: 0 0 10px 0; font-family: Lato, sans-serif; font-size: 25px; line-height: 30px; color: #333333; font-weight: normal;">
|
||||
Hello {{ recipientUser.name }}!</h1>
|
||||
<p style="margin: 0;">You have received a new chat message from <b>{{ senderUser.name }}</b>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 0 20px;">
|
||||
<!-- Button : BEGIN -->
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" style="margin: auto;">
|
||||
<tr>
|
||||
<td class="button-td button-td-primary" style="border-radius: 4px; background: #17b53e;">
|
||||
<a class="button-a button-a-primary" href="{{{ actionUrl }}}"
|
||||
style="background: #17b53e; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; text-decoration: none; padding: 13px 17px; color: #ffffff; display: block; border-radius: 4px;">Show Chat</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- Button : END -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text + Button : END -->
|
||||
|
||||
</table>
|
||||
<!-- Email Body English : END -->
|
||||
@ -1,9 +0,0 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable security/detect-non-literal-fs-filename */
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
|
||||
// eslint-disable-next-line n/no-sync
|
||||
const readFile = (fileName) => fs.readFileSync(path.join(__dirname, fileName), 'utf-8')
|
||||
|
||||
export const notification = readFile('./notification.html')
|
||||
@ -1,83 +0,0 @@
|
||||
<!-- emailSubject: "{{APPLICATION_NAME}} – Benachrichtigung" -->
|
||||
<!-- Email Body German : BEGIN -->
|
||||
<table class="email-german" align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%"
|
||||
style="margin: auto;">
|
||||
|
||||
<!-- Hero Image, Flush : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff;">
|
||||
<img
|
||||
src="{{{ welcomeImageUrl }}}"
|
||||
width="300" height="" alt="Welcome image" border="0"
|
||||
style="width: 100%; max-width: 300px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block; padding: 20px;"
|
||||
class="g-img">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Hero Image, Flush : END -->
|
||||
|
||||
<!-- 1 Column Text + Button : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; padding-top: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<h1
|
||||
style="margin: 0 0 10px 0; font-family: Lato, sans-serif; font-size: 25px; line-height: 30px; color: #333333; font-weight: normal;">
|
||||
Hallo {{ name }},</h1>
|
||||
<p style="margin: 0;">Du hast mindestens eine Benachrichtigung erhalten. Klick auf diesen Button, um sie anzusehen:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 0 20px;">
|
||||
<!-- Button : BEGIN -->
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" style="margin: auto;">
|
||||
<tr>
|
||||
<td class="button-td button-td-primary" style="border-radius: 4px; background: #17b53e;">
|
||||
<a class="button-a button-a-primary" href="{{{ actionUrl }}}"
|
||||
style="background: #17b53e; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; text-decoration: none; padding: 13px 17px; color: #ffffff; display: block; border-radius: 4px;">Benachrichtigungen
|
||||
ansehen</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- Button : END -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text + Button : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="padding: 20px; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0; margin-top: 10px;">Bis bald bei <a href="{{{ ORGANIZATION_URL }}}"
|
||||
style="color: #17b53e;">{{APPLICATION_NAME}}</a>!</p>
|
||||
<p style="margin: 0; margin-bottom: 10px;">– Dein {{APPLICATION_NAME}} Team</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="padding: 20px; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0; margin-top: 10px;">PS: Möchtest du keine E-Mails mehr erhalten, dann ändere deine <a href="{{{ settingsUrl }}}"
|
||||
style="color: #17b53e;">Benachrichtigungseinstellungen</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
</table>
|
||||
<!-- Email Body German : END -->
|
||||
@ -1,186 +0,0 @@
|
||||
<!-- Email Body German : BEGIN -->
|
||||
<table class="email-german" align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%"
|
||||
style="margin: auto;">
|
||||
|
||||
<!-- Hero Image, Flush : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff;">
|
||||
<img
|
||||
src="{{{ welcomeImageUrl }}}"
|
||||
width="300" height="" alt="Welcome image" border="0"
|
||||
style="width: 100%; max-width: 300px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block; padding: 20px;"
|
||||
class="g-img">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Hero Image, Flush : END -->
|
||||
|
||||
<!-- 1 Column Text + Button : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; padding-top: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<h1
|
||||
style="margin: 0 0 10px 0; font-family: Lato, sans-serif; font-size: 25px; line-height: 30px; color: #333333; font-weight: normal;">
|
||||
Hallo {{ name }}!</h1>
|
||||
<p style="margin: 0;">Du möchtest also deine E-Mail ändern? Kein Problem! Mit Klick auf diesen Button
|
||||
kannst Du Deine neue E-Mail Adresse bestätigen:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 0 20px;">
|
||||
<!-- Button : BEGIN -->
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" style="margin: auto;">
|
||||
<tr>
|
||||
<td class="button-td button-td-primary" style="border-radius: 4px; background: #17b53e;">
|
||||
<a class="button-a button-a-primary" href="{{{ actionUrl }}}"
|
||||
style="background: #17b53e; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; text-decoration: none; padding: 13px 17px; color: #ffffff; display: block; border-radius: 4px;">E-Mail
|
||||
Adresse
|
||||
bestätigen</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- Button : END -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text + Button : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; padding-bottom: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0;">Falls Du deine E-Mail Adresse doch nicht ändern möchtest, kannst du diese Nachricht
|
||||
einfach ignorieren. Melde Dich gerne <a href="{{{ supportUrl }}}" style="color: #17b53e;">bei
|
||||
unserem Support Team</a>, wenn du noch Fragen hast!</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="padding: 20px; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0;">Sollte der Button für Dich nicht funktionieren, kannst Du auch folgenden Code in
|
||||
Dein Browserfenster kopieren: <span style="color: #17b53e;">{{{ nonce }}}</span></p>
|
||||
<p style="margin: 0; margin-top: 10px;">Bis bald bei <a href="{{{ ORGANIZATION_URL }}}"
|
||||
style="color: #17b53e;">{{{APPLICATION_NAME}}}</a>!</p>
|
||||
<p style="margin: 0; margin-bottom: 10px;">– Dein {{APPLICATION_NAME}} Team</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="display: none;">
|
||||
<p>–––––––––––––––––––––––––––––––––––––––––––––––</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
</table>
|
||||
<!-- Email Body German : END -->
|
||||
|
||||
<!-- Email Body English : BEGIN -->
|
||||
<table class="email-english" align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%"
|
||||
style="margin: auto;">
|
||||
<tr>
|
||||
<td style="padding: 20px 0; text-align: center">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Hero Image, Flush : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff;">
|
||||
<img
|
||||
src="{{{ welcomeImageUrl }}}"
|
||||
width="300" height="" alt="Welcome image" border="0"
|
||||
style="width: 100%; max-width: 300px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block; padding: 20px;"
|
||||
class="g-img">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Hero Image, Flush : END -->
|
||||
|
||||
<!-- 1 Column Text + Button : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; padding-top: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<h1
|
||||
style="margin: 0 0 10px 0; font-family: Lato, sans-serif; font-size: 25px; line-height: 30px; color: #333333; font-weight: normal;">
|
||||
Hello {{ name }}!</h1>
|
||||
<p style="margin: 0;">So, you want to change your e-mail? No problem! Just click the button below to verify
|
||||
your new address:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 0 20px;">
|
||||
<!-- Button : BEGIN -->
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" style="margin: auto;">
|
||||
<tr>
|
||||
<td class="button-td button-td-primary" style="border-radius: 4px; background: #17b53e;">
|
||||
<a class="button-a button-a-primary" href="{{{ actionUrl }}}"
|
||||
style="background: #17b53e; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; text-decoration: none; padding: 13px 17px; color: #ffffff; display: block; border-radius: 4px;">Verify
|
||||
e-mail address</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- Button : END -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text + Button : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; padding-bottom: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0;">If you don't want to change your e-mail address feel free to ignore this message. You
|
||||
can
|
||||
also <a href="{{{ supportUrl }}}" style="color: #17b53e;">contact our
|
||||
support team</a> if you have any questions!</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="padding: 20px; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0;">If the above button doesn't work you can also copy the following code into your
|
||||
browser window: <span style="color: #17b53e;">{{{ nonce }}}</span></p>
|
||||
<p style="margin: 0; margin-top: 10px;">See you soon on <a href="{{{ ORGANIZATION_URL }}}"
|
||||
style="color: #17b53e;">{{{APPLICATION_NAME}}}</a>!</p>
|
||||
<p style="margin: 0; margin-bottom: 10px;">– The {{APPLICATION_NAME}} Team</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
</table>
|
||||
<!-- Email Body English : END -->
|
||||
@ -1,9 +0,0 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable security/detect-non-literal-fs-filename */
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
|
||||
// eslint-disable-next-line n/no-sync
|
||||
const readFile = (fileName) => fs.readFileSync(path.join(__dirname, fileName), 'utf-8')
|
||||
|
||||
export const notification = readFile('./notification.html')
|
||||
@ -1,83 +0,0 @@
|
||||
<!-- emailSubject: "{{APPLICATION_NAME}} – Notification" -->
|
||||
<!-- Email Body English : BEGIN -->
|
||||
<table class="email-german" align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%"
|
||||
style="margin: auto;">
|
||||
|
||||
<!-- Hero Image, Flush : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff;">
|
||||
<img
|
||||
src="{{{ welcomeImageUrl }}}"
|
||||
width="300" height="" alt="Welcome image" border="0"
|
||||
style="width: 100%; max-width: 300px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block; padding: 20px;"
|
||||
class="g-img">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Hero Image, Flush : END -->
|
||||
|
||||
<!-- 1 Column Text + Button : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; padding-top: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<h1
|
||||
style="margin: 0 0 10px 0; font-family: Lato, sans-serif; font-size: 25px; line-height: 30px; color: #333333; font-weight: normal;">
|
||||
Hello {{ name }},</h1>
|
||||
<p style="margin: 0;">You received at least one notification. Click on this button to view them:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 0 20px;">
|
||||
<!-- Button : BEGIN -->
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" style="margin: auto;">
|
||||
<tr>
|
||||
<td class="button-td button-td-primary" style="border-radius: 4px; background: #17b53e;">
|
||||
<a class="button-a button-a-primary" href="{{{ actionUrl }}}"
|
||||
style="background: #17b53e; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; text-decoration: none; padding: 13px 17px; color: #ffffff; display: block; border-radius: 4px;">View
|
||||
notifications</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- Button : END -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text + Button : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="padding: 20px; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0; margin-top: 10px;">See you soon on <a href="{{{ ORGANIZATION_URL }}}"
|
||||
style="color: #17b53e;">{{APPLICATION_NAME}}</a>!</p>
|
||||
<p style="margin: 0; margin-bottom: 10px;">– The {{APPLICATION_NAME}} Team</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="padding: 20px; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0; margin-top: 10px;">PS: If you don't want to receive e-mails anymore, change your <a href="{{{ settingsUrl }}}"
|
||||
style="color: #17b53e;">notification settings</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
</table>
|
||||
<!-- Email Body English : END -->
|
||||
@ -1,15 +0,0 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable security/detect-non-literal-fs-filename */
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
|
||||
// eslint-disable-next-line n/no-sync
|
||||
const readFile = (fileName) => fs.readFileSync(path.join(__dirname, fileName), 'utf-8')
|
||||
|
||||
export const signup = readFile('./signup.html')
|
||||
export const passwordReset = readFile('./resetPassword.html')
|
||||
export const wrongAccount = readFile('./wrongAccount.html')
|
||||
export const emailVerification = readFile('./emailVerification.html')
|
||||
export const chatMessage = readFile('./chatMessage.html')
|
||||
|
||||
export const layout = readFile('./layout.html')
|
||||
@ -1,197 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"
|
||||
xmlns:o="urn:schemas-microsoft-com:office:office">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="x-apple-disable-message-reformatting">
|
||||
<meta name="format-detection" content="telephone=no,address=no,email=no,date=no,url=no">
|
||||
<title>{{ subject }}</title>
|
||||
|
||||
<!--[if mso]>
|
||||
<style>
|
||||
* {
|
||||
font-family: sans-serif !important;
|
||||
}
|
||||
</style>
|
||||
<![endif]-->
|
||||
|
||||
<!--[if !mso]><!-->
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700' rel='stylesheet' type='text/css'>
|
||||
<!--<![endif]-->
|
||||
|
||||
<!-- CSS RESETS -->
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
height: 100% !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
* {
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
div[style*="margin: 16px 0"] {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
table,
|
||||
td {
|
||||
mso-table-lspace: 0pt !important;
|
||||
mso-table-rspace: 0pt !important;
|
||||
}
|
||||
|
||||
table {
|
||||
border-spacing: 0 !important;
|
||||
border-collapse: collapse !important;
|
||||
table-layout: fixed !important;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
|
||||
img {
|
||||
-ms-interpolation-mode: bicubic;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a[x-apple-data-detectors],
|
||||
.unstyle-auto-detected-links a,
|
||||
.aBn {
|
||||
border-bottom: 0 !important;
|
||||
cursor: default !important;
|
||||
color: inherit !important;
|
||||
text-decoration: none !important;
|
||||
font-size: inherit !important;
|
||||
font-family: inherit !important;
|
||||
font-weight: inherit !important;
|
||||
line-height: inherit !important;
|
||||
}
|
||||
|
||||
.a6S {
|
||||
display: none !important;
|
||||
opacity: 0.01 !important;
|
||||
}
|
||||
|
||||
.im {
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
img.g-img+div {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* iPhone 4, 4S, 5, 5S, 5C, and 5SE */
|
||||
@media only screen and (min-device-width: 320px) and (max-device-width: 374px) {
|
||||
u~div .email-container {
|
||||
min-width: 320px !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* iPhone 6, 6S, 7, 8, and X */
|
||||
@media only screen and (min-device-width: 375px) and (max-device-width: 413px) {
|
||||
u~div .email-container {
|
||||
min-width: 375px !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* iPhone 6+, 7+, and 8+ */
|
||||
@media only screen and (min-device-width: 414px) {
|
||||
u~div .email-container {
|
||||
min-width: 414px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<!--[if gte mso 9]>
|
||||
<xml>
|
||||
<o:OfficeDocumentSettings>
|
||||
<o:AllowPNG/>
|
||||
<o:PixelsPerInch>96</o:PixelsPerInch>
|
||||
</o:OfficeDocumentSettings>
|
||||
</xml>
|
||||
<![endif]-->
|
||||
|
||||
<!-- PROGRESSIVE ENHANCEMENTS -->
|
||||
<style>
|
||||
.button-td,
|
||||
.button-a {
|
||||
transition: all 100ms ease-in;
|
||||
}
|
||||
|
||||
.button-td-primary:hover,
|
||||
.button-a-primary:hover {
|
||||
background: #19c243 !important;
|
||||
border-color: #555555 !important;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
.email-container p {
|
||||
font-size: 17px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body width="100%" style="margin: 0; padding: 0 !important; mso-line-height-rule: exactly; background-color: #f5f4f6;">
|
||||
<center style="width: 100%; background-color: #f5f4f6;">
|
||||
<!--[if mso | IE]>
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color: #f5f4f6;">
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
|
||||
<div style="max-width: 600px; margin: 0 auto;" class="email-container">
|
||||
<!--[if mso]>
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="600">
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
|
||||
<p style="color:#19c243; font-style: italic; font-family: Lato, sans-serif; font-size: 16px; padding-top: 20px;">{{englishHint}}</p>
|
||||
|
||||
{{> content}}
|
||||
|
||||
<!-- Email Footer : BEGIN -->
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%"
|
||||
style="margin: auto;">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; font-family: Lato, sans-serif; font-size: 12px; line-height: 15px; text-align: center; color: #888888;">
|
||||
<br>
|
||||
<a href="{{{ ORGANIZATION_URL }}}" target="_blank" style="color: #17b53e;">{{ORGANIZATION_NAME}}</a>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- Email Footer : END -->
|
||||
|
||||
<!--[if mso]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</div>
|
||||
|
||||
<!--[if mso | IE]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</center>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -1,185 +0,0 @@
|
||||
<!-- Email Body German : BEGIN -->
|
||||
<table class="email-german" align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%"
|
||||
style="margin: auto;">
|
||||
|
||||
<!-- Hero Image, Flush : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff;">
|
||||
<img
|
||||
src="{{{ welcomeImageUrl }}}"
|
||||
width="300" height="" alt="Welcome image" border="0"
|
||||
style="width: 100%; max-width: 300px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block; padding: 20px;"
|
||||
class="g-img">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Hero Image, Flush : END -->
|
||||
|
||||
<!-- 1 Column Text + Button : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; padding-top: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<h1
|
||||
style="margin: 0 0 10px 0; font-family: Lato, sans-serif; font-size: 25px; line-height: 30px; color: #333333; font-weight: normal;">
|
||||
Hallo {{ name }}!</h1>
|
||||
<p style="margin: 0;">Du hast also dein Passwort vergessen? Kein Problem! Mit Klick auf diesen Button
|
||||
kannst Du innerhalb der nächsten 24 Stunden Dein Passwort zurücksetzen:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 0 20px;">
|
||||
<!-- Button : BEGIN -->
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" style="margin: auto;">
|
||||
<tr>
|
||||
<td class="button-td button-td-primary" style="border-radius: 4px; background: #17b53e;">
|
||||
<a class="button-a button-a-primary" href="{{{ actionUrl }}}"
|
||||
style="background: #17b53e; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; text-decoration: none; padding: 13px 17px; color: #ffffff; display: block; border-radius: 4px;">Passwort
|
||||
zurücksetzen</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- Button : END -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text + Button : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; padding-bottom: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0;">Falls Du kein neues Passwort angefordert hast, kannst Du diese E-Mail einfach
|
||||
ignorieren. Wenn Du noch Fragen hast, melde Dich gerne <a href="{{{ supportUrl }}}"
|
||||
style="color: #17b53e;">bei
|
||||
unserem Support Team</a>!</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="padding: 20px; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0;">Sollte der Button für Dich nicht funktionieren, kannst Du auch folgenden Code in
|
||||
Dein Browserfenster kopieren: <span style="color: #17b53e;">{{{ nonce }}}</span></p>
|
||||
<p style="margin: 0; margin-top: 10px;">Bis bald bei <a href="{{{ ORGANIZATION_URL }}}"
|
||||
style="color: #17b53e;">{{APPLICATION_NAME}}</a>!</p>
|
||||
<p style="margin: 0; margin-bottom: 10px;">– Dein {{APPLICATION_NAME}} Team</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="display: none;">
|
||||
<p>–––––––––––––––––––––––––––––––––––––––––––––––</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
</table>
|
||||
<!-- Email Body German : END -->
|
||||
|
||||
<!-- Email Body English : BEGIN -->
|
||||
<table class="email-english" align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%"
|
||||
style="margin: auto;">
|
||||
<tr>
|
||||
<td style="padding: 20px 0; text-align: center">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Hero Image, Flush : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff;">
|
||||
<img
|
||||
src="{{{ welcomeImageUrl }}}"
|
||||
width="300" height="" alt="Welcome image" border="0"
|
||||
style="width: 100%; max-width: 300px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block; padding: 20px;"
|
||||
class="g-img">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Hero Image, Flush : END -->
|
||||
|
||||
<!-- 1 Column Text + Button : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; padding-top: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<h1
|
||||
style="margin: 0 0 10px 0; font-family: Lato, sans-serif; font-size: 25px; line-height: 30px; color: #333333; font-weight: normal;">
|
||||
Hello {{ name }}!</h1>
|
||||
<p style="margin: 0;">So, you forgot your password? No problem! Just click the button below to reset
|
||||
it within the next 24 hours:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 0 20px;">
|
||||
<!-- Button : BEGIN -->
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" style="margin: auto;">
|
||||
<tr>
|
||||
<td class="button-td button-td-primary" style="border-radius: 4px; background: #17b53e;">
|
||||
<a class="button-a button-a-primary" href="{{{ actionUrl }}}"
|
||||
style="background: #17b53e; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; text-decoration: none; padding: 13px 17px; color: #ffffff; display: block; border-radius: 4px;">Reset
|
||||
password</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- Button : END -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text + Button : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; padding-bottom: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0;">If you didn't request a new password feel free to ignore this e-mail. You can
|
||||
also <a href="{{{ supportUrl }}}" style="color: #17b53e;">contact our
|
||||
support team</a> if you have any questions!</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="padding: 20px; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0;">If the above button doesn't work you can also copy the following code into your
|
||||
browser window: <span style="color: #17b53e;">{{{ nonce }}}</span></p>
|
||||
<p style="margin: 0; margin-top: 10px;">See you soon on <a href="{{{ ORGANIZATION_URL }}}"
|
||||
style="color: #17b53e;">{{APPLICATION_NAME}}</a>!</p>
|
||||
<p style="margin: 0; margin-bottom: 10px;">– The {{APPLICATION_NAME}} Team</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
</table>
|
||||
<!-- Email Body English : END -->
|
||||
@ -1,214 +0,0 @@
|
||||
<!-- Email Body German : BEGIN -->
|
||||
<table class="email-german" align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%"
|
||||
style="margin: auto;">
|
||||
|
||||
<!-- Hero Image, Flush : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff;">
|
||||
<img
|
||||
src="{{{ welcomeImageUrl }}}"
|
||||
width="300" height="" alt="Welcome image" border="0"
|
||||
style="width: 100%; max-width: 300px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block; padding: 20px;"
|
||||
class="g-img">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Hero Image, Flush : END -->
|
||||
|
||||
<!-- 1 Column Text + Button : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; padding-top: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<h1
|
||||
style="margin: 0 0 10px 0; font-family: Lato, sans-serif; font-size: 25px; line-height: 30px; color: #333333; font-weight: normal;">
|
||||
Willkommen bei {{APPLICATION_NAME}}!</h1>
|
||||
<p style="margin: 0;">Danke, dass Du dich angemeldet hast – wir freuen uns, Dich dabei zu haben. Jetzt
|
||||
fehlt nur noch eine Kleinigkeit, bevor wir gemeinsam die Welt verbessern können ... Bitte bestätige
|
||||
Deine E-Mail Adresse:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 0 20px;">
|
||||
<!-- Button : BEGIN -->
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" style="margin: auto;">
|
||||
<tr>
|
||||
<td class="button-td button-td-primary" style="border-radius: 4px; background: #17b53e;">
|
||||
<a class="button-a button-a-primary" href="{{{ actionUrl }}}"
|
||||
style="background: #17b53e; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; text-decoration: none; padding: 13px 17px; color: #ffffff; display: block; border-radius: 4px;">Bestätige
|
||||
Deine E-Mail Adresse</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- Button : END -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center; color :#17b53e">
|
||||
<p>–––––––––––––––––––––––––––––––––––––––––––––––</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text + Button : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="padding: 20px; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0;">Sollte der Button für Dich nicht funktionieren, kannst Du auch folgenden Code in Dein Browserfenster kopieren: <span style="color: #17b53e;">{{{ nonce }}}</span></p>
|
||||
<p style="margin: 0;">Das funktioniert allerdings nur, wenn du Dich über unsere Website registriert hast.</p>
|
||||
<p style="margin: 0; margin-top: 10px;">Falls Du Dich nicht selbst bei <a href="{{{ ORGANIZATION_URL }}}"
|
||||
style="color: #17b53e;">{{APPLICATION_NAME}}</a> angemeldet hast, schau doch mal vorbei!
|
||||
Wir sind ein gemeinnütziges Aktionsnetzwerk – von Menschen für Menschen.</p>
|
||||
<p style="margin: 0; margin-top: 10px;">PS: Wenn Du keinen Account bei uns möchtest, kannst Du diese
|
||||
E-Mail einfach ignorieren. ;)</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center; color :#17b53e">
|
||||
<p>–––––––––––––––––––––––––––––––––––––––––––––––</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="padding: 20px; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0;">Melde Dich gerne <a href="{{{ supportUrl }}}" style="color: #17b53e;">bei
|
||||
unserem Support Team</a>, wenn Du Fragen hast.</p>
|
||||
<p style="margin: 0; margin-top: 10px;">Bis bald bei <a href="{{{ ORGANIZATION_URL }}}"
|
||||
style="color: #17b53e;">{{APPLICATION_NAME}}</a>!</p>
|
||||
<p style="margin: 0; margin-bottom: 10px;">– Dein {{APPLICATION_NAME}} Team</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="display: none;">
|
||||
<p>–––––––––––––––––––––––––––––––––––––––––––––––</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
</table>
|
||||
<!-- Email Body German : END -->
|
||||
|
||||
<!-- Email Body English : BEGIN -->
|
||||
<table class="email-english" align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%"
|
||||
style="margin: auto;">
|
||||
<tr>
|
||||
<td style="padding: 20px 0; text-align: center">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Hero Image, Flush : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff;">
|
||||
<img
|
||||
src="{{{ welcomeImageUrl }}}"
|
||||
width="300" height="" alt="Welcome image" border="0"
|
||||
style="width: 100%; max-width: 300px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block; padding: 20px;"
|
||||
class="g-img">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Hero Image, Flush : END -->
|
||||
|
||||
<!-- 1 Column Text + Button : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; padding-top: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<h1
|
||||
style="margin: 0 0 10px 0; font-family: Lato, sans-serif; font-size: 25px; line-height: 30px; color: #333333; font-weight: normal;">
|
||||
Welcome to {{APPLICATION_NAME}}!</h1>
|
||||
<p style="margin: 0;">Thank you for joining our cause – it's awesome to have you on board. There's
|
||||
just one tiny step missing before we can start shaping the world together ... Please confirm your
|
||||
e-mail address by clicking the button below:</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 0 20px;">
|
||||
<!-- Button : BEGIN -->
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" style="margin: auto;">
|
||||
<tr>
|
||||
<td class="button-td button-td-primary" style="border-radius: 4px; background: #17b53e;">
|
||||
<a class="button-a button-a-primary" href="{{{ actionUrl }}}"
|
||||
style="background: #17b53e; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; text-decoration: none; padding: 13px 17px; color: #ffffff; display: block; border-radius: 4px;">Confirm
|
||||
your e-mail address</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- Button : END -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center; color :#17b53e">
|
||||
<p>–––––––––––––––––––––––––––––––––––––––––––––––</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text + Button : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="padding: 20px; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0;">If the above button doesn't work, you can also copy the following code into your browser window: <span style="color: #17b53e;">{{{ nonce }}}</span></p>
|
||||
<p style="margin: 0;">However, this only works if you have registered through our website.</p>
|
||||
<p style="margin: 0; margin-top: 10px;">If you didn't sign up for <a href="{{{ ORGANIZATION_URL }}}"
|
||||
style="color: #17b53e;">{{APPLICATION_NAME}}</a> we recommend you to check it out!
|
||||
It's a social network from people for people who want to connect and change the world together.</p>
|
||||
<p style="margin: 0; margin-top: 10px;">PS: If you ignore this e-mail we will not create an account
|
||||
for
|
||||
you. ;)</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center; color :#17b53e">
|
||||
<p>–––––––––––––––––––––––––––––––––––––––––––––––</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="padding: 20px; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0;">Feel free to <a href="{{{ supportUrl }}}" style="color: #17b53e;">contact our
|
||||
support team</a> with any
|
||||
questions you have.</p>
|
||||
<p style="margin: 0; margin-top: 10px;">See you soon on <a href="{{{ ORGANIZATION_URL }}}"
|
||||
style="color: #17b53e;">{{APPLICATION_NAME}}</a>!</p>
|
||||
<p style="margin: 0; margin-bottom: 10px;">– The {{APPLICATION_NAME}} Team</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
</table>
|
||||
<!-- Email Body English : END -->
|
||||
@ -1,185 +0,0 @@
|
||||
<!-- Email Body German : BEGIN -->
|
||||
<table class="email-german" align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%"
|
||||
style="margin: auto;">
|
||||
|
||||
<!-- Hero Image, Flush : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff;">
|
||||
<img
|
||||
src="{{{ welcomeImageUrl }}}"
|
||||
width="300" height="" alt="Welcome image" border="0"
|
||||
style="width: 100%; max-width: 300px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block; padding: 20px;"
|
||||
class="g-img">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Hero Image, Flush : END -->
|
||||
|
||||
<!-- 1 Column Text + Button : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; padding-top: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<h1
|
||||
style="margin: 0 0 10px 0; font-family: Lato, sans-serif; font-size: 25px; line-height: 30px; color: #333333; font-weight: normal;">
|
||||
Hallo!</h1>
|
||||
<p style="margin: 0;">Du hast bei uns ein neues Passwort angefordert – leider haben wir aber keinen Account mit Deiner E-Mailadresse gefunden.
|
||||
Kann es sein, dass Du mit einer anderen Adresse bei uns
|
||||
angemeldet bist?</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 0 20px;">
|
||||
<!-- Button : BEGIN -->
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" style="margin: auto;">
|
||||
<tr>
|
||||
<td class="button-td button-td-primary" style="border-radius: 4px; background: #17b53e;">
|
||||
<a class="button-a button-a-primary" href="{{{ actionUrl }}}"
|
||||
style="background: #17b53e; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; text-decoration: none; padding: 13px 17px; color: #ffffff; display: block; border-radius: 4px;">Versuch'
|
||||
es mit einer anderen E-Mail</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- Button : END -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text + Button : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="padding: 20px; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0;">Wenn Du noch keinen Account bei <a href="{{{ ORGANIZATION_URL }}}"
|
||||
style="color: #17b53e;">{{APPLICATION_NAME}}</a> hast oder Dein Password gar nicht ändern willst,
|
||||
kannst Du diese E-Mail einfach ignorieren!</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; padding-top: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0;">Ansonsten hilft Dir <a href="{{{ supportUrl }}}" style="color: #17b53e;">unser
|
||||
Support Team</a> gerne weiter.</p>
|
||||
<p style="margin: 0; margin-top: 10px;">Bis bald bei <a href="{{{ ORGANIZATION_URL }}}"
|
||||
style="color: #17b53e;">{{APPLICATION_NAME}}</a>!</p>
|
||||
<p style="margin: 0; margin-bottom: 10px;">– Dein {{APPLICATION_NAME}} Team</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="display: none;">
|
||||
<p>–––––––––––––––––––––––––––––––––––––––––––––––</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
</table>
|
||||
<!-- Email Body German : END -->
|
||||
|
||||
<!-- Email Body English : BEGIN -->
|
||||
<table class="email-english" align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%"
|
||||
style="margin: auto;">
|
||||
<tr>
|
||||
<td style="padding: 20px 0; text-align: center">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Hero Image, Flush : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff;">
|
||||
<img
|
||||
src="{{{ welcomeImageUrl }}}"
|
||||
width="300" height="" alt="Welcome image" border="0"
|
||||
style="width: 100%; max-width: 300px; height: auto; background: #ffffff; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; color: #555555; margin: auto; display: block; padding: 20px;"
|
||||
class="g-img">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Hero Image, Flush : END -->
|
||||
|
||||
<!-- 1 Column Text + Button : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; padding-top: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<h1
|
||||
style="margin: 0 0 10px 0; font-family: Lato, sans-serif; font-size: 25px; line-height: 30px; color: #333333; font-weight: normal;">
|
||||
Hello!</h1>
|
||||
<p style="margin: 0;">You requested a password reset but unfortunately we couldn't find an account associated with your e-mail address.
|
||||
Did you maybe use another one when you signed up?</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 0 20px;">
|
||||
<!-- Button : BEGIN -->
|
||||
<table align="center" role="presentation" cellspacing="0" cellpadding="0" border="0" style="margin: auto;">
|
||||
<tr>
|
||||
<td class="button-td button-td-primary" style="border-radius: 4px; background: #17b53e;">
|
||||
<a class="button-a button-a-primary" href="{{{ actionUrl }}}"
|
||||
style="background: #17b53e; font-family: Lato, sans-serif; font-size: 16px; line-height: 15px; text-decoration: none; padding: 13px 17px; color: #ffffff; display: block; border-radius: 4px;">Try
|
||||
a different e-mail</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- Button : END -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text + Button : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td style="padding: 20px; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0;">If you don't have an account at <a href="{{{ ORGANIZATION_URL }}}"
|
||||
style="color: #17b53e;">{{APPLICATION_NAME}}</a> yet or if you didn't want to reset your password,
|
||||
please ignore this e-mail.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
<!-- 1 Column Text : BEGIN -->
|
||||
<tr>
|
||||
<td style="background-color: #ffffff; padding: 0 20px;">
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td
|
||||
style="padding: 20px; padding-top: 0; font-family: Lato, sans-serif; font-size: 16px; line-height: 22px; color: #555555;">
|
||||
<p style="margin: 0;">Otherwise <a href="{{{ supportUrl }}}" style="color: #17b53e;">our
|
||||
support team</a> will be happy to help you out.</p>
|
||||
<p style="margin: 0; margin-top: 10px;">See you soon on <a href="{{{ ORGANIZATION_URL }}}"
|
||||
style="color: #17b53e;">{{APPLICATION_NAME}}</a>!</p>
|
||||
<p style="margin: 0; margin-bottom: 10px;">– The {{APPLICATION_NAME}} Team</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 1 Column Text : END -->
|
||||
|
||||
</table>
|
||||
<!-- Email Body English : END -->
|
||||
@ -1,7 +1,5 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
import { applyMiddleware, IMiddleware } from 'graphql-middleware'
|
||||
|
||||
|
||||
@ -30,6 +30,8 @@ services:
|
||||
environment:
|
||||
- NODE_ENV="development"
|
||||
- DEBUG=true
|
||||
- SMTP_PORT=1025
|
||||
- SMTP_HOST=mailserver
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user