Verschieden Settings hinzugefügt (inkomplett)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import nodemailer from 'nodemailer';
|
||||
import i18n from '../utils/i18n.js';
|
||||
import UserParamValue from '../models/type/user_param_value.js';
|
||||
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: process.env.SMTP_HOST,
|
||||
@@ -23,7 +24,13 @@ export const sendPasswordResetEmail = async (email, resetLink, language) => {
|
||||
await transporter.sendMail(mailOptions);
|
||||
};
|
||||
|
||||
export const sendAccountActivationEmail = async (email, activationLink, username, resetToken, language) => {
|
||||
export const sendAccountActivationEmail = async (email, activationLink, username, resetToken, languageId) => {
|
||||
const languageObject = await UserParamValue.findOne({
|
||||
where: {
|
||||
id: languageId
|
||||
}
|
||||
});
|
||||
const language = languageObject.value;
|
||||
i18n.setLocale(language);
|
||||
const mailOptions = {
|
||||
from: process.env.SMTP_FROM,
|
||||
|
||||
Reference in New Issue
Block a user