feat: add admin dashboard and core API routes with Docker configuration
This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
import nodemailer from 'nodemailer';
|
||||
|
||||
console.log('SMTP Config:', {
|
||||
host: process.env.SMTP_HOST,
|
||||
port: process.env.SMTP_PORT,
|
||||
secure: process.env.SMTP_SECURE,
|
||||
user: process.env.SMTP_USER
|
||||
});
|
||||
const transporter = nodemailer.createTransport({
|
||||
host: process.env.SMTP_HOST,
|
||||
port: parseInt(process.env.SMTP_PORT || '587'),
|
||||
@@ -15,7 +9,7 @@ const transporter = nodemailer.createTransport({
|
||||
pass: process.env.SMTP_PASS,
|
||||
},
|
||||
tls: {
|
||||
rejectUnauthorized: false
|
||||
rejectUnauthorized: process.env.NODE_ENV === 'production'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -29,7 +23,6 @@ export const sendEmail = async ({ to, subject, html }: { to: string; subject: st
|
||||
|
||||
try {
|
||||
const info = await transporter.sendMail(mailOptions);
|
||||
console.log('Email sent: ' + info.response);
|
||||
return info;
|
||||
} catch (error) {
|
||||
console.error('Error sending email:', error);
|
||||
|
||||
Reference in New Issue
Block a user