fix(mail): cast SMTP pool options pour build TypeScript Docker

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
MARTIN Julien 2026-06-16 16:07:03 +02:00
parent e1684676a7
commit c226c2fcdf

View File

@ -69,21 +69,17 @@ export class MailService {
const smtpUser = this.configService.get<string>('smtp_user');
const smtpPassword = this.configService.get<string>('smtp_password');
const transportConfig: SMTPTransport.Options = {
const transportConfig = {
host: smtpHost,
port: smtpPort,
secure: smtpSecure,
pool: true,
maxConnections: 1,
maxMessages: 100,
};
if (smtpAuthRequired && smtpUser && smtpPassword) {
transportConfig.auth = {
user: smtpUser,
pass: smtpPassword,
};
}
...(smtpAuthRequired && smtpUser && smtpPassword
? { auth: { user: smtpUser, pass: smtpPassword } }
: {}),
} as SMTPTransport.Options;
return transportConfig;
}