parent
588c369615
commit
3c11f0acda
@ -93,6 +93,20 @@ export const configurationSchema = {
|
|||||||
required: ['from', 'transport']
|
required: ['from', 'transport']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const testSchema = {
|
||||||
|
type: 'object',
|
||||||
|
|
||||||
|
properties: {
|
||||||
|
to: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'recipient of the test mail'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
additionalProperties: false,
|
||||||
|
required: ['to']
|
||||||
|
}
|
||||||
|
|
||||||
// ===================================================================
|
// ===================================================================
|
||||||
|
|
||||||
class TransportEmailPlugin {
|
class TransportEmailPlugin {
|
||||||
@ -141,6 +155,16 @@ class TransportEmailPlugin {
|
|||||||
this._unset()
|
this._unset()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test ({to}) {
|
||||||
|
return this._sendEmail({
|
||||||
|
to,
|
||||||
|
subject: '[Xen Orchestra] Test of transport-email plugin',
|
||||||
|
markdown: `Hi there,
|
||||||
|
|
||||||
|
The transport-email plugin for Xen Orchestra server seems to be working fine, nicely done :)`
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
_sendEmail ({
|
_sendEmail ({
|
||||||
from = this._conf.from,
|
from = this._conf.from,
|
||||||
to, cc, bcc,
|
to, cc, bcc,
|
||||||
|
Loading…
Reference in New Issue
Block a user