mirror of
https://github.com/docmost/docmost.git
synced 2025-11-10 06:52:07 +10:00
Implement nodemailer ignore tls property (#299)
This commit is contained in:
@ -32,6 +32,7 @@ SMTP_PORT=587
|
||||
SMTP_USERNAME=
|
||||
SMTP_PASSWORD=
|
||||
SMTP_SECURE=false
|
||||
SMTP_IGNORETLS=false
|
||||
|
||||
# Postmark driver config
|
||||
POSTMARK_TOKEN=
|
||||
|
||||
@ -98,6 +98,13 @@ export class EnvironmentService {
|
||||
return secure === 'true';
|
||||
}
|
||||
|
||||
getSmtpIgnoreTLS(): boolean {
|
||||
const ignoretls = this.configService
|
||||
.get<string>('SMTP_IGNORETLS', 'false')
|
||||
.toLowerCase();
|
||||
return ignoretls === 'true';
|
||||
}
|
||||
|
||||
getSmtpUsername(): string {
|
||||
return this.configService.get<string>('SMTP_USERNAME');
|
||||
}
|
||||
|
||||
@ -44,6 +44,7 @@ export const mailDriverConfigProvider = {
|
||||
connectionTimeout: 30 * 1000, // 30 seconds
|
||||
auth,
|
||||
secure: environmentService.getSmtpSecure(),
|
||||
ignoreTLS: environmentService.getSmtpIgnoreTLS()
|
||||
} as SMTPTransport.Options,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user