Support

Admin Tools

#41444 Auto import and update Admin Tools Email templates.

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
5.2.2
PHP version
8.3.14
Admin Tools version
7.6.2

Latest post by nicholas on Friday, 20 December 2024 08:28 CST

NicoFaaij

Hi,

I often change the title and body text in the AdminTools Mail Templates, in the different languages. That's a lot of copy and paste work to copy it to all my other systems. It would also be a huge time saver for new websites, if in addition to the configuration, the associated email templates could be imported and updated automatically. I was considering diving into the database to see if I can do it with some home-made SQL scripts. However, I wouldn't be surprised if you already know a much better way to keep the Admin Tools Email templates in sync across all systems. That's why I'm asking first or you know a better approach to do this ;-)

With kind regards, Nico

nicholas
Akeeba Staff
Manager

Since Joomla! 4, mail templates are managed directly by Joomla! rather than Admin Tools. They are stored in the #__mail_templates database table. All Admin Tools emails have the value com_admintools in their extension column.

Based on this, you can use phpMyAdmin to export the Admin Tools mail templates from a site. Subsequently, open phpMyAdmin on the site you want to transfer them, delete the existing mail templates belonging to Admin Tools, and import the file containing your templates.

While this method may seem cumbersome, Joomla! does not provide any other means of exporting or importing mail templates. I would prefer if there was a core-supported Joomla! CLI method, as it is evident that professionals managing a multitude of sites would greatly benefit from such an option. Instead, we got a somewhat redundant feature that wraps all emails with a template, as if Joomla! is implying that developers and users should not use the Mail Templates feature. This approach is perplexing and frustrating, to say the least.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

NicoFaaij

Thanks Nicholas. So SQL outside Joomla is indeed the way to go. Changing the Mail templates is very important to me, especially to get the most important information via Pushover(.net) directly on my iPhone lock screen, when I'm on the go ;-). So I'm going to try to make a PHP script(s) for it.

nicholas
Akeeba Staff
Manager

You're welcome!

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!