Closed pkbarbiedoll closed 8 months ago
Thanks, have used your suggestions!
Thank you!
Could you update the following:
Backup the following files from your Mantis installation:
config/config_inc.php (add entries as needed)
core/email_api.php (changes in core marked with "## CN")
CHANGE TO:
Backup the following files from your Mantis installation:
config/config_inc.php
core/email_api.php
The added text is confusing given the back up instruction. Additional steps are explained further in the readme.
Done!
I've made some suggested modifications to the README text for mailtemplate:
Enabling HTML emails within Mantisbt
This is not a plugin but a guide to use templated HTML emails within MantisBT.
Version 20240314
Copyright
License
Released under the GPL v3 license.
Requirements
Installation
Backup the following files from your Mantis installation:
config/config_inc.php
(add entries as needed)core/email_api.php
(changes in core marked with "## CN")Next, perform the following copy operations: a. Copy
~/distribution/core/template_api.php
into~/mantis/core/
folder. b. Copy~/distribution/core/templates/
folder into~/mantis/core/
folder.If using Mantis 2.26:
~/distribution/core/email_api-226.php
to~/mantis/core/
folder.If using Mantis 2.25:
~/distribution/core/email_api-225.php
to~/mantis/core/
folder.For both Mantis 2.25 and 2.26:
~/mantis/core/email_api-XXX.php
to~/mantis/core/email_api.php
.Next, edit
~/distribution/config/entries-config_inc.php
:/var/www/html/
, but may vary):$g_newbug_mailtemplate = "/path/to/mantis/core/templates/newbug_mailtemplate.html";
$g_bug_mailtemplate = "/path/to/mantis/core/templates/bug_mailtemplate.html";
$g_note_mailtemplate = "/path/to/mantis/core/templates/note_mailtemplate.html";
Finally, paste entire text in
~/distribution/config/entries-config_inc.php
to the bottom of~/mantis/config/config_inc.php
.Configuration
Basic configuration is done within config/config_inc.php:
config/config_inc.php
Template lay-outs
After instllation, template files are located in ~/mantis/core/templates/
Three layouts are provided:
Various fields from Mantis may be inserted into the templates. A full list of available Mantis fields are located at the top of each template file.
Each file is fully customizable. Logos are also supported via img tags.
Back up files prior to making edits.
Support
File bug reports and submit questions on the GitHub issues tracker.
Warning
Remember that when upgrading you will need to adjust core/email_api.php again:(
Remarks
Please let me know how to further improve.....
Have a blast!
changes
08-10-2020 Initial version 26-10-2020 Bugfixes 25-06-2022 Added Escape funtion 25-06-2022 Added special template for new issues 17-08-2022 Made the Escape function configurable (config_inc.php & core/email_api.php) 17-08-2022 Fixed minor lay-out issues in template_api.php 14-03-2024 Added improved readme 14-03-2024 Added sample email_api.php for MantisBT version 2.26