Глобальный рефакторинг компонетов

This commit is contained in:
Web-serfer 2026-04-15 21:32:55 +05:00
parent ba9806a85a
commit 27804e9345
9 changed files with 89 additions and 33 deletions

View file

@ -1,4 +1,5 @@
import nodemailer from 'nodemailer';
import type { EmailOptions } from '../globalInterfaces';
const SMTP_HOST = import.meta.env.SMTP_HOST || 'localhost';
const SMTP_PORT = import.meta.env.SMTP_PORT || 1025;
@ -20,12 +21,6 @@ function getTransporter() {
return transporter;
}
export interface EmailOptions {
to: string;
subject: string;
html: string;
}
export async function sendEmail(options: EmailOptions): Promise<boolean> {
try {
console.log('Sending email to:', options.to);