Koha-clms/admin
Saiful Amin 10fc3f3c64
Bug 29587: Test mail option in SMTP servers
Edit: Added CSRF protection.

This patch adds a "Send test email" action to the SMTP servers
administration page. It sends a test message to the address in
the KohaAdminEmailAddress system preference and reports success
or failure to the user.

Test plan:
1. Add a valid SMTP server in Administration → SMTP servers.
2. Set KohaAdminEmailAddress to a valid email address.
3. Apply the patch.
4. Click "Send test email" in the Actions column.
5. Confirm that Koha reports "Test email sent successfully".
6. Edit the SMTP server and change the domain to an invalid one.
7. Click "Send test email" again.
8. Confirm that Koha reports failure.
9. Sign off.

Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-06-15 18:12:16 -06:00
..
searchengine/elasticsearch Bug 42156: Add a stdno index for authid 2026-04-23 09:25:03 -06:00
additional-fields.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
admin-home.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
adveditorshortcuts.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
aqbudgetperiods.pl Bug 42764: Fix spelling errors across the codebase 2026-06-11 09:53:34 -06:00
aqbudgets.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
aqcontract.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
aqplan.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
audio_alerts.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
auth_subfields_structure.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
auth_tag_structure.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
authorised_values.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
authtypes.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
background_jobs.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
biblio_framework.pl Bug 32773: Add ability to set biblio_framework.is_fast_add 2026-05-08 16:05:35 -06:00
branch_transfer_limits.pl Bug 41131: Don't allow limiting transfers from/to a single branch 2026-02-26 09:04:19 -07:00
branches.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
cash_registers.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
categories.pl Bug 26355: (follow-up) Fix handling of extended attributes 2026-05-01 09:30:04 -06:00
check_budget_parent.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
check_parent_total.pl Bug 42764: Fix spelling errors across the codebase 2026-06-11 09:53:34 -06:00
checkmarc.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
cities.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
classsources.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
clone-rules.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
columns_settings.pl Bug 40680: Fix admin/columns_settings.pl 2025-12-01 08:33:58 -07:00
columns_settings.yml Bug 37762: (QA follow-up): Add filters to supply ILL table 2026-05-08 12:25:51 -06:00
credit_types.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
curbside_pickup.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
currency.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
debit_types.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
desks.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
didyoumean.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
edi_accounts.pl Bug 20253: Optionally use buyer's purchase order number from EDIFACT quote as basket name 2025-11-03 14:13:37 -07:00
edi_ean_accounts.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
file_transports.pl Bug 41798: Fix FTP passive mode not saving and add display indicator 2026-02-10 10:51:21 -07:00
float_limits.pl Bug 28530: (QA follow-up) Use DBIC in controller 2026-02-10 10:51:41 -07:00
identity_providers.pl Bug 37711: Domains CRUD update 2025-11-05 07:12:32 -07:00
ill_batch_statuses.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
import_export_authtype.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
import_export_framework.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
item_circulation_alerts.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
items_search_field.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
items_search_fields.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
itemtypes.pl Bug 38136: Refactor database translations (alternative) 2026-04-15 11:37:14 -06:00
koha2marclinks.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
library_groups.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
localization.pl Bug 38136: Refactor database translations (alternative) 2026-04-15 11:37:14 -06:00
marc-overlay-rules.pl Bug 35380: (QA follow-up) Minor code quality fixes 2026-03-26 09:50:53 +01:00
marc_order_accounts.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
marc_subfields_structure.pl Bug 38384: (follow-up) move require Koha::Plugins to use 2026-02-25 07:37:00 -07:00
marctagstructure.pl Bug 39825: Add a direct link to items tag in MARC bibliographic framework page 2025-11-03 14:13:43 -07:00
matching-rules.pl Bug 40680: Fix admin/matching-rules.pl 2025-12-01 08:33:58 -07:00
oai_servers.pl Bug 41043: Use op 'add_form' and 'edit_form' in oai servers 2026-02-06 15:17:11 -07:00
oai_set_mappings.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
oai_sets.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
overdrive.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
patron-attr-types.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
preferences.pl Bug 41076: Adjust our perl tidiness for v20250105 2026-02-05 09:03:51 -07:00
record_sources.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
restrictions.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
search_filters.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
share_content.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
smart-rules.pl Bug 41267: Add fill_other_biblio_holds_policy circulation rule 2026-04-09 08:27:26 -06:00
sms_providers.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
smtp_servers.pl Bug 29587: Test mail option in SMTP servers 2026-06-15 18:12:16 -06:00
sru_modmapping.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
systempreferences.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
transfer_limits.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
transport-cost-matrix.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
usage_statistics.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
z3950servers.pl Bug 40841: Add limits configuration UI 2026-03-26 14:21:28 +01:00