mail: switch from deprecated TLS usage to STARTTLS
This commit is contained in:
parent
fe772c4e14
commit
6618e874e0
@ -20,7 +20,7 @@ export default class Mail {
|
|||||||
const transporter = nodemailer.createTransport({
|
const transporter = nodemailer.createTransport({
|
||||||
host: config.get('mail.host'),
|
host: config.get('mail.host'),
|
||||||
port: config.get('mail.port'),
|
port: config.get('mail.port'),
|
||||||
secure: config.get('mail.secure'),
|
requireTLS: config.get('mail.secure'), // STARTTLS
|
||||||
auth: {
|
auth: {
|
||||||
user: config.get('mail.username'),
|
user: config.get('mail.username'),
|
||||||
pass: config.get('mail.password'),
|
pass: config.get('mail.password'),
|
||||||
|
@ -8,11 +8,11 @@ export default class MailComponent extends ApplicationComponent<void> {
|
|||||||
|
|
||||||
|
|
||||||
public async checkSecuritySettings(): Promise<void> {
|
public async checkSecuritySettings(): Promise<void> {
|
||||||
// if (!config.get<boolean>('mail.secure')) {
|
if (!config.get<boolean>('mail.secure')) {
|
||||||
// throw new SecurityError('Cannot set mail.secure to false');
|
throw new SecurityError('Cannot set mail.secure (starttls) to false');
|
||||||
// }
|
}
|
||||||
if (config.get<boolean>('mail.allow_invalid_tls')) {
|
if (config.get<boolean>('mail.allow_invalid_tls')) {
|
||||||
throw new SecurityError('Cannot set mail.allow_invalid_tls to true');
|
throw new SecurityError('Cannot set mail.allow_invalid_tls (ignore tls failure) to true');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user