[dev] [PATCH] Default BCC for each identity?

Nicholas Sushkin nsushkin at users.sourceforge.net
Tue Nov 18 08:17:11 PST 2003


On Mon, 17 Nov 2003, Michael M Slusarz wrote:

> Quoting Nicholas Sushkin <nsushkin at users.sourceforge.net>:
>
> | Here's a patch to IMP HEAD branch that allows to have initial values of
> | the BCC header for each identity. This is a feature that I frequently use
> | in KDE KMail that I really miss in IMP.
> |
> | Basically, I added a field 'bcc_addr' to the identity object. The new
> | field contains a list of bcc addresses. When you compose a message,
> | your BCC: header would be automatically initialized from the bcc_addr
> | identity field. If you switch your identity in the compose window,
> | the bcc addresses from the new identity will override the current value
> | of the BCC: header.
>
> I've cleaned this up a bit and committed it.  Thanks.

Michael,

Great, thanks!

I looked through the final version that you committed, and it looks great
with the exception of one spot, about which I just want to raise one
concern.

File imp/identities.php contains code that takes input from the html form
and parses it into individual addresses. The html form
templates/indentities/manage.inc prompts the user to enter each email on
new line. Apparently, the intent is to support RFC addresses of the format
"First Last <email at host.tld>" that may contain spaces. However, contrary
to these instructions, you use "\s+" as the delimiter to split the form
input into individual addresses.  As the result, the input "Nicholas
Sushkin <nsushkin at users.sourceforge.net>" in bcc_addr field gets parsed as
"nicholas, sushkin, nsushkin at users.sourceforge.net". While this may be the
sensible (although incorrectly prompted for) parsing for alias_addr and
tieto_addr fields, it doesn't make sense for bcc_addr.

The code that I originally submitted used "[\n\r]+" as the token delimiter
for parsing bcc_addr, correctly supporting the prompted for behavior.

Could you fix this?

> NOTE: Since the current 'auto-bcc' preference was essentially a subset of
> this functionality, I have removed that preference - if you want to
> auto-bcc yourself, simply add your e-mail address to the list of BCC
> addresses in the identities screen.

Yes, missed that...


More information about the dev mailing list