tizbac-proxmoxbackupclient_go/config.json.example
Giuseppe Pagano 0b20763a53 feat: add template engine to mail
This commit also introduced the capability to define multiple mail recipients using a comma separated list of addresses
2024-09-19 10:02:56 +02:00

31 lines
1.2 KiB
Plaintext

{
"baseurl": "https://your.pbs.installation.net:8007",
"certfingerprint": "XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX",
"authid": "MY-SECRET-AUTH-ID",
"secret": "secret-uuid",
"datastore": "myDatastore",
"backupdir": "C:",
"namespace": "",
"backup-id": "",
"pxarout": "",
"smtp": {
"host": "smtp.example.com",
"port": "465",
"username": "my-user@example.com",
"password": "my-password",
"insecure": false,
"template": {
"subject": "{{if not .Success}}[FAILED]{{else}}[SUCCESS]{{end}} Backup report for {{.Datastore}}",
"body": "Backup {{if .Success}}completed{{else}}ended with errors{{end}} on host {{.Hostname}} (took {{.FromattedDuration}})\n{{if .Success}}Chunks New {{.NewChunks}}, Reused {{.ReusedChunks}}.{{else}}Error occurred while working, backup may be not completed.\nLast error is: {{.ErrorStr}}{{end}}"
},
"mails": [{
"from": "sender1@example.com",
"to": "receiver1@example.com
}, {
"from": "sender2@example.com",
"to": "receiver2@example.com
}]
}
}