![]() Registered Member ![]()
|
Hello
I'm trying to get a specific header 'X-Apparently-To' and its value from a received message in Kmail and save it in the reply of that message for further use and to complete the "From" field of my reply. To get the header into my reply, I modified the following method this way: MessageFactory::MessageReply MessageFactory::createReply()
I'm able to modify the From field according to my wishes, but the Header "X-Apparently-To" is not kept in the reply when I save it as a draft ![]() How can I achieve the header to be saved in the draft ? ![]() I'm using Kmail from KDEPIM 4.14 (debian jessie) |
![]() Administrator ![]()
|
You want this header only on specific messages? Because in Configure KMail > Compose > Headers, you can set specific headers when composing.
"Violence is the last refuge of the incompetent."
![]() Plasma FAQ maintainer - Plasma programming with Python |
![]() Registered Member ![]()
|
Actually I want this Header to contain different values depending on some header of the message I reply to.
Concerning your suggestion about the custom headers, I tried to figure out where these custom headers are managed in the code, but I noticed that custom headers are never saved in the draft message although they appear in the message that is sent. That's probably a bug. (BTW, are you able to reproduce this ? Is this by design, or a bug that I should report ?) Nevertheless I found out the place where it is necessary to specify the headers that have to be saved in the draft message. It has to be done in the following method of file messagecomposer/composer/composerviewbase.cpp
Adding these lines at the end of the method fixed my problem.
Kind regards |
![]() Administrator ![]()
|
While this fixed it for you, you may want to file a wishlist on bugs.kde.org to have the matter generalized (although it won't happen soon, because PIM is in hard feature freeze).
"Violence is the last refuge of the incompetent."
![]() Plasma FAQ maintainer - Plasma programming with Python |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]