Bug 22343: Add classes for handling SMTP servers
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 28 Jul 2020 15:35:26 +0000 (12:35 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 2 Oct 2020 08:54:40 +0000 (10:54 +0200)
commitdfe216bd19fe3e6ad20b5189962d235fa5c8d573
tree4669ff0d6231a47dca83a72d8dd872b4230b61ee
parent44b3e64431ddaa99ce24b63acba3c0b81cb58f78
Bug 22343: Add classes for handling SMTP servers

This patch introduces classes to handle SMTP servers. It is done in a
way that a default server can be set, and then per-library ones can be
set. All should be done with Koha::SMTP::Servers methods, that take care
of overwriting library-specific configs, and handle the defaults
retrieval and setting correctly.

To test:
1. Apply this patches
2. Run:
   $ kshell
   $ perl installer/data/mysql/updatedatabase.pl
=> SUCCESS: Atomic update is ok, smtp_servers table created
3. Run:
  k$ prove t/db_dependent/Koha/SMTP/
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/SMTP/Server.pm [new file with mode: 0644]
Koha/SMTP/Servers.pm [new file with mode: 0644]
t/db_dependent/Koha/SMTP/Server.t [new file with mode: 0644]
t/db_dependent/Koha/SMTP/Servers.t [new file with mode: 0644]