|
|
@ -14,21 +14,19 @@ export default class SMTP implements IEmailAdapter { |
|
|
|
|
|
|
|
|
|
|
|
public async init(): Promise<any> { |
|
|
|
public async init(): Promise<any> { |
|
|
|
const config = { |
|
|
|
const config = { |
|
|
|
// from: this.input.from,
|
|
|
|
|
|
|
|
// options: {
|
|
|
|
|
|
|
|
host: this.input?.host, |
|
|
|
host: this.input?.host, |
|
|
|
port: parseInt(this.input?.port, 10), |
|
|
|
port: parseInt(this.input?.port, 10), |
|
|
|
secure: this.input?.secure === 'true', |
|
|
|
secure: this.input?.secure, |
|
|
|
ignoreTLS: |
|
|
|
ignoreTLS: this.input?.ignoreTLS, |
|
|
|
typeof this.input?.ignoreTLS === 'boolean' |
|
|
|
|
|
|
|
? this.input?.ignoreTLS |
|
|
|
|
|
|
|
: this.input?.ignoreTLS === 'true', |
|
|
|
|
|
|
|
auth: { |
|
|
|
auth: { |
|
|
|
user: this.input?.username, |
|
|
|
user: this.input?.username, |
|
|
|
pass: this.input?.password, |
|
|
|
pass: this.input?.password, |
|
|
|
}, |
|
|
|
}, |
|
|
|
// }
|
|
|
|
tls: { |
|
|
|
|
|
|
|
rejectUnauthorized: this.input?.rejectUnauthorized, |
|
|
|
|
|
|
|
}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
this.transporter = nodemailer.createTransport(config); |
|
|
|
this.transporter = nodemailer.createTransport(config); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|