Generic template with i18next

This commit is contained in:
vjrj 2017-11-13 21:24:35 +01:00
parent 5b311446dc
commit 403a108dba
15 changed files with 242 additions and 77 deletions

View file

@ -4,13 +4,13 @@ import getOAuthProfile from '../../../modules/get-oauth-profile';
export default (options, user) => {
const OAuthProfile = getOAuthProfile(options, user);
const applicationName = 'Application Name';
const applicationName = '¡Tod@s contra el Fuego!';
const firstName = OAuthProfile ? OAuthProfile.name.first : options.profile.name.first;
const emailAddress = OAuthProfile ? OAuthProfile.email : options.email;
return sendEmail({
to: emailAddress,
from: `${applicationName} <support@application.com>`,
from: `${applicationName} <noreply@comunes.org>`,
subject: `[${applicationName}] Welcome, ${firstName}!`,
template: 'welcome',
templateVars: {