fix(mail): cast SMTP pool options pour build TypeScript Docker
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
e1684676a7
commit
c226c2fcdf
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user