SUMMARY When using the %body argument to an external script, the %body argument is always empty instead of containing the body/contents of the selected mail on which the external script is run. I have tried both HTML and plaintext mails. STEPS TO REPRODUCE 0. Create a script that allows you to see the %body argument, for example: ``` #!/bin/bash kdialog --passivepopup "$1" 10 ``` 1. Go to `Settings`->`Configure KMail`->`Plugins` 2. Enable the 'External Script' plugin (checkbox) and click the configure button 3. Click Add Script 4. Fill in a name and for Executable pick your script 5. Add %body in the argument field (just %body without quotes) 6. Click OK and apply the changes 7. Right click on a message -> External Script -> Name you gave the script OBSERVED RESULT The kdialog pop up appears, but is empty. Using #1 in the script shows that there is an argument (number of arguments = 1), but apparently it filled with an empty string? Other values such as %s and %from work as expected. EXPECTED RESULT The %body argument should not be empty => the KDialog pop up window should show the body/content of the selected mail. SOFTWARE/OS VERSIONS KDE Plasma Version: 6.5.4 KDE Frameworks Version: 6.21.0 Qt Version: 6.10.1 ADDITIONAL INFORMATION
I will look at it. Regards
Correction, it does work for plaintext e-mails, but not HTML e-mails.
I confirm it
Git commit 27cb390bcc57f2d8d2349751fb8c61409eccf19f by Laurent Montel. Committed on 05/01/2026 at 07:01. Pushed by mlaurent into branch 'master'. Fix External Script Plugin %body argument is always empty for HTML mails Not perfect yet but allow to return not empty text M +8 -2 plugins/messageviewerplugins/externalscriptplugin/viewerpluginexternalscriptparseargument.cpp https://invent.kde.org/pim/kdepim-addons/-/commit/27cb390bcc57f2d8d2349751fb8c61409eccf19f