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