feat: Add built dist files with EU compliance routes
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 20s
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 20s
- Include compiled TypeScript with new /impressum, /privacy, /terms routes - Temporary commit of dist files for Docker deployment
This commit is contained in:
parent
5ef8f34133
commit
1ef8f5743c
21 changed files with 2179 additions and 0 deletions
29
dist/services/email.js
vendored
Normal file
29
dist/services/email.js
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import nodemailer from "nodemailer";
|
||||
import logger from "./logger.js";
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: process.env.SMTP_HOST || "host.docker.internal",
|
||||
port: Number(process.env.SMTP_PORT || 25),
|
||||
secure: false,
|
||||
connectionTimeout: 5000,
|
||||
greetingTimeout: 5000,
|
||||
socketTimeout: 10000,
|
||||
tls: { rejectUnauthorized: false },
|
||||
});
|
||||
export async function sendVerificationEmail(email, code) {
|
||||
try {
|
||||
const info = await transporter.sendMail({
|
||||
from: "DocFast <noreply@docfast.dev>",
|
||||
to: email,
|
||||
subject: "DocFast - Verify your email",
|
||||
text: `Your DocFast verification code is: ${code}\n\nThis code expires in 15 minutes.\n\nIf you didn't request this, ignore this email.`,
|
||||
});
|
||||
logger.info({ email, messageId: info.messageId }, "Verification email sent");
|
||||
return true;
|
||||
}
|
||||
catch (err) {
|
||||
logger.error({ err, email }, "Failed to send verification email");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// NOTE: sendRecoveryEmail removed — API keys must NEVER be sent via email.
|
||||
// Key recovery now shows the key in the browser after code verification.
|
||||
Loading…
Add table
Add a link
Reference in a new issue