Bug 27424: Add ability to specify an SMTP server in the database as the default server
authorKyle Hall <kyle@bywatersolutions.com>
Thu, 20 Jan 2022 19:26:13 +0000 (14:26 -0500)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 31 Jan 2023 13:52:48 +0000 (10:52 -0300)
commit26d1e6540d9a9b3417fcaaf551d6870fe1c1c081
treecf8f9225474a8c89941520a7404303c4dbd901e2
parent90f1da416edc0eab55b9210b30d084f10060a3d6
Bug 27424: Add ability to specify an SMTP server in the database as the default server

Bug 22343 adds the ability to defined SMTP servers via the UI; But to then utilise them you have to go to each individual library via the libraries admin area and select the SMTP server.

We should have a way to override the fallback/default SMTP server right from the SMTP servers administration page.. setting one of our defined SMTP Servers as the system default rather than using the hard coded fallback options.

Test Plan:
1) Apply this patch set
2) Restart all the things!
3) Browser to the SMTP servers editor,
   verify only one server can be set as the default server
4) Set a default server, verify that server was used to send email from
   a cronjob, AND/OR prove t/db_dependent/Koha/SMTP/Server.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/SMTP/Servers.pm
admin/smtp_servers.pl
api/v1/swagger/definitions/smtp_server.yaml
installer/data/mysql/kohastructure.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt
t/db_dependent/Koha/SMTP/Server.t