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 smtpUser = this.configService.get<string>('smtp_user');
|
||||||
const smtpPassword = this.configService.get<string>('smtp_password');
|
const smtpPassword = this.configService.get<string>('smtp_password');
|
||||||
|
|
||||||
const transportConfig: SMTPTransport.Options = {
|
const transportConfig = {
|
||||||
host: smtpHost,
|
host: smtpHost,
|
||||||
port: smtpPort,
|
port: smtpPort,
|
||||||
secure: smtpSecure,
|
secure: smtpSecure,
|
||||||
pool: true,
|
pool: true,
|
||||||
maxConnections: 1,
|
maxConnections: 1,
|
||||||
maxMessages: 100,
|
maxMessages: 100,
|
||||||
};
|
...(smtpAuthRequired && smtpUser && smtpPassword
|
||||||
|
? { auth: { user: smtpUser, pass: smtpPassword } }
|
||||||
if (smtpAuthRequired && smtpUser && smtpPassword) {
|
: {}),
|
||||||
transportConfig.auth = {
|
} as SMTPTransport.Options;
|
||||||
user: smtpUser,
|
|
||||||
pass: smtpPassword,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return transportConfig;
|
return transportConfig;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user