feat(xo-server-transport-email): ability to customize transport settings (#5681)

See xoa-support#3327

This functionnality can help users to get more info about their SMTP issues
This commit is contained in:
badrAZ 2021-03-23 15:47:31 +01:00 committed by GitHub
parent c9b64927be
commit fa56e594b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -31,6 +31,7 @@
>
> In case of conflict, the highest (lowest in previous list) `$version` wins.
- xo-server-transport-email minor
- @xen-orchestra/fs minor
- xo-server patch
- xo-web patch

View File

@ -128,7 +128,8 @@ export const testSchema = {
// ===================================================================
class TransportEmailPlugin {
constructor({ xo }) {
constructor({ staticConfig, xo }) {
this._staticConfig = staticConfig
this._xo = xo
this._unset = null
@ -157,7 +158,7 @@ class TransportEmailPlugin {
break
}
const transport = createTransport(transportConf, { from })
const transport = createTransport({ ...transportConf, ...this._staticConfig.transport }, { from })
transport.use('compile', markdownCompiler)
this._send = promisify(transport.sendMail, transport)