Bug 2509 - manually added headers are lost unless mail is sent inmediately
Summary: manually added headers are lost unless mail is sent inmediately
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: UI/Compose Window (show other bugs)
Version: 3.8.0
Hardware: All All
: P3 major
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2011-10-02 00:24 UTC by Ricardo Mones
Modified: 2011-11-18 22:22 UTC (History)
0 users

See Also:


Attachments
fix for both use cases causing the bug (7.40 KB, patch)
2011-10-24 17:06 UTC, Ricardo Mones
no flags Details | Diff

Description Ricardo Mones 2011-10-02 00:24:19 UTC
Steps to reproduce:
 * Compose a mail
 * Fill the To: address
 * Add a custom header, for example:
   - edit one blank header replacing the To: by X-My-Header:
   - enter a value for the header "my header value"
 * Enter something in the body, just for fun

From this points there's two ways:

Case a)
 * Save to drafts, compose window closes
 * Go to drafts folder and reopen the just drafted mail
 * All other data is here but the X-My-Header (and its value) are gone.

Case b)
 * Go File menu and close Claws Mail
 * Restart Claws Mail, the compose window reopens
 * With all the data except the X-My-Header (and its value) which are gone.

I'm setting severity major because of the user data loss.

thanks in advance,
Comment 1 Ricardo Mones 2011-10-24 17:06:31 UTC
Created attachment 1033 [details]
fix for both use cases causing the bug

Fix proposal that works by adding a new X-Claws-Manual-Headers header with the manually added headers names which have to be recovered later.

Fortunately Claws Mail already saves the manually added headers, so it's only matter to tell it to recover them from the draft and add to the compose window ;)
Comment 2 Ricardo Mones 2011-11-17 00:35:01 UTC
Any comment on the patch? Is it OK to commit?
Comment 3 Colin Leroy 2011-11-17 09:08:19 UTC
Hi,

Yeah, seems good!
Comment 4 users 2011-11-18 20:37:35 UTC
Changes related to this bug have been committed.
Please check latest CVS and update the bug accordingly.
You can also get the patch from:
http://www.colino.net/claws-mail/

2011-11-18 [mones]	3.7.10cvs87

	* src/compose.c
	* src/procheader.c
	* src/procheader.h
		Fixes bug #2509, "manually added headers are lost unless
		mail is sent inmediately"

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