feat: verschlüsselte Integrationseinstellungen, Haushaltsmitglieder mit Ersteller, Backup-Download
This commit is contained in:
1 parent
a1195223e0
commit
267f4fcf70
21 files changed
+724
-30
No files matched your search
+6
-4
@@ -1,10 +1,12 @@
|
||||
import nodemailer from "nodemailer";
|
||||
import { getSmtpSettings } from "./integration-settings";
|
||||
|
||||
export async function sendMail(to: string, subject: string, text: string): Promise<void> {
|
||||
const smtp = await getSmtpSettings();
|
||||
const t = nodemailer.createTransport({
|
||||
host: process.env.SMTP_HOST,
|
||||
port: Number(process.env.SMTP_PORT ?? 587),
|
||||
auth: { user: process.env.SMTP_USER, pass: process.env.SMTP_PASS },
|
||||
host: smtp.host || undefined,
|
||||
port: smtp.port,
|
||||
auth: smtp.user || smtp.pass ? { user: smtp.user, pass: smtp.pass } : undefined,
|
||||
});
|
||||
await t.sendMail({ from: process.env.MAIL_FROM, to, subject, text });
|
||||
await t.sendMail({ from: smtp.from || undefined, to, subject, text });
|
||||
}
|
||||
Reference in new issue
Block a user