Bug 3790 - Compose window should allow to add custom headers to the message
Summary: Compose window should allow to add custom headers to the message
Status: RESOLVED INVALID
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: UI/Compose Window (show other bugs)
Version: 3.14.1
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2017-03-22 12:13 UTC by mildred-bug.claws
Modified: 2017-03-23 09:13 UTC (History)
0 users

See Also:


Attachments

Description mildred-bug.claws 2017-03-22 12:13:01 UTC
Sometimes, when creating messages, it is required to add custom headers to it. it should be possible to do so. Either by being able to open the complete message (including headers) in an external editor, or by being able to add new headers to the list of compose headers.

it is already possible to add headers using scripting. Using the ~/.claws-mail/python-scripts/auto/compose_any script containing:

    clawsmail.compose_window.add_header('Foo', 'bar')

The only problem with that solution is that the header name cannot be customized in the claws mail UI and must be set in the script itself. When you want to change the headers, you have to change the script before you open the compose window.

A Tool>Add custom header that prompt for the header name and run the above function would work very well for me.

Use case: create control messages for a newgroup server I manage. The special "Control:" and "Approved:" headers must be set.
Comment 1 Paul 2017-03-22 12:24:34 UTC
See the 'Hidden preferences' section of the manual, look for the 'type_any_header' option
http://www.claws-mail.org/manual/claws-mail-manual.html#adv_hidden
Comment 2 mildred-bug.claws 2017-03-23 09:07:22 UTC
Looking through the code, I also found the file ~/.claws-mail/extraheaderrc that can contain a list (one per line) of extra headers that would be available in the header list.
Comment 3 Paul 2017-03-23 09:13:08 UTC
(In reply to comment #2)
> Looking through the code, I also found the file ~/.claws-mail/extraheaderrc
> that can contain a list (one per line) of extra headers that would be
> available in the header list.

Of course, using `man claws-mail` would have told you sooner than reading through the code.

That file gives you extra custom headers to choose from. The 'type_any_header' option allows you add any header at all.

Note You need to log in before you can comment on or make changes to this bug.