Глобальный рефакторинг компонетов
This commit is contained in:
parent
ba9806a85a
commit
27804e9345
9 changed files with 89 additions and 33 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue