Bug 3574 - Template addressing
Summary: Template addressing
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Other (show other bugs)
Version: 3.13.0
Hardware: All All
: P3 enhancement
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2015-12-01 14:06 UTC by MD
Modified: 2016-12-10 12:34 UTC (History)
0 users

See Also:


Attachments
Possible fix (1.13 KB, patch)
2016-11-30 16:40 UTC, Ricardo Mones
no flags Details | Diff

Description MD 2015-12-01 14:06:59 UTC
For some reason, Email address conventions in the templates is not the same as when sending Email with "compose".  The first problem is that Email addresses cannot be separated by spaces.  They must be separated only with commas.  And if the user puts a space after the comma, that causes failure too.  It would be nice if the addressing was the same as with "Compose" where one can use commas, spaces, or comma-spaces to separate addresses.

The second issue is that all the Email addresses have to be formatted with "@domain" or they will not work.  On a system that uses local delivery, it can be confusing and irritating for the user.  For example I might want to do this:

tom, sally, joan, pres@whitehouse.gov

But instead I have to do this:

tom@mydomain.com,sally@mydomain.com,joan@mydomain.com,pres@whitehouse.gov

which takes a lot longer, is harder to read, and increases the changes of a typo.
Comment 1 Ricardo Mones 2016-11-30 16:40:58 UTC
Created attachment 1703 [details]
Possible fix

This patch fixes this issue for me, which hit me this morning when trying to modify a template :)

Checks are removed from all address fields, since they're parsed later when template is applied. This allows both for local addresses and complex addresses, always using commas for separation and optionally any number of spaces for readability.

I understand initial intention of this code was to provide a pre-validated input before inserting, but the implemented checks are too simplistic and restrict usage causing more problems than benefits: some invalid addresses are still allowed and  some valid addresses are not allowed at all, so twice bad ;-)
Comment 2 wwp 2016-11-30 19:05:38 UTC
So far so good, no regression w/ the patch applied here against latest git version. Even tried few naive tests and no problem. Not a guarantee anyway!
Comment 3 users 2016-12-10 12:34:03 UTC
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

++ ChangeLog	2016-12-10 13:34:03.135481008 +0100
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=57207707795a3a26a23f260782055398e51c01cf
Merge: a6ee4c0 9123296
Author: Colin Leroy <colin@colino.net>
Date:   Sat Dec 10 13:34:02 2016 +0100

    Merge branch 'master' of file:///home/git/claws

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=9123296406a1f61f21464ca8fd439d315b4c8367
Author: Ricardo Mones <ricardo@mones.org>
Date:   Sat Dec 10 13:32:41 2016 +0100

    Fix bug #3574: Template addressing
    
    Remove artificial limitations to values of email addresses on templates:
    these strings are already parsed and split when the template is applied
    in compose window.

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