Implement nodemailer ignore tls property (#299)
This commit is contained in:
parent
2ae3816324
commit
9390b39e35
3 changed files with 9 additions and 0 deletions
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue