https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42870

--- Comment #4 from David Cook <[email protected]> ---
Created attachment 200618
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200618&action=edit
Bug 42870: Add email transport config to smtp_servers

This change adds a `smtp_servers.config` JSON database column,
and adds a "transport_module" method to Koha::STMP::Server,
which allow staff users to designate which module they want to use
for their email transport for each SMTP Server that they set up.

The default transport is the same email transport we've been using
for years.

The alternatives are supplied by Koha Plugins implementing the
new_email_transport() method.

These transports have access to the Koha::SMTP::Server object,
which also means they can take advantage of this new `smtp_servers.config`
field to store additional configuration they might need.

This change also comes with a Koha Plugin bundled with it. This plugin
is fully operational and just replicates the current "Default" behaviour.
It serves as a model from which to build your own Koha Plugins.

Test plan:
0. Apply the patch
1. perl /usr/share/koha/bin/devel/install_plugins.pl \
    --include Koha::Plugin::Core::Email::Transport::SMTP::Basic
1. restart_all
2. Go to Administration > SMTP servers and click "New SMTP server"
3. Note a new field "Transport module:" which has options of "Default"
    and "Basic SMTP Email Transport" available in a select list.
4. Fill in the details however you like (ideally using a real functional SMTP
server)
5. Click "Submit"
6. Note the "Transport module:" displaying under "Current default
configuration"
7. Click on "Edit" next to your SMTP server
8. Change the "Transport module" and click "Submit"
9. Note that the module changes with the modification

10. If possible, try to send an email by going to a patron record
    (e.g.
http://localhost:8081/cgi-bin/koha/members/notices.pl?borrowernumber=51)
    and clicking "More" and clicking "Send welcome notice"
11. As your Koha instance user (ie using koha-shell), run the following:
    perl /usr/share/koha/bin/cronjobs/process_message_queue.pl -v
12. If you have a valid SMTP server configured, it should send the email using
your
    selected email transport module

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to