[Users] Fixing my issues with plugin/config?

Milan Obuch claws-mail-users at dino.sk
Fri Sep 24 16:01:24 CEST 2021


On Thu, 16 Sep 2021 15:35:50 -0400, Charles Lane
<lane at duphy4.physics.drexel.edu> wrote:

> On Thu, 16 Sep 2021 21:24:48 +0200
> Milan Obuch <claws-mail-users at dino.sk> wrote:
> > You are confirming what I wrote. In addition, I forgot, there is a
> > possibility to write 'compose_check_before_send' script in my plugin
> > (this functionality is not present in Python plugin, but I think it
> > is not that hard to add it there).
> > 
> > There was somewhat similar question in past, look at archives, URL
> > is
> > https://lists.claws-mail.org/pipermail/users/2021-March/027889.html
> > (plus four messages in that thread).  
> 
> Yes, I am confirming it; I got Paul's reply before yours and messages
> crossed. I'll check that archive entry, thanks!

I put following together, it is usable as part (the beginning) of
hook/compose_created script for Lua plugin:

------------------------------------------------------------------------------

local compose_window = ...
local do_check = false
[[ evaluate conditions ]]
if (do_check) then
 choice = clawsmail.alertpanel("Reply check","is this intended?","Yes","No")))
 compose_window:popup()
 [[ modify compose window parameters ]]
end

------------------------------------------------------------------------------

There are just placeholders for evaluating whether you should do
something, i.e. you are really replying to yourself, and modifying
parameters of compose window to change it to be sent to someone else.
This needs to be customized for you and your environment.

This approach currently requires building Claws Mail (or at least Lua
plugin) from source, as Lua plugin is not yet present in official source
repository.

Regards,
Milan


More information about the Users mailing list