Hello Dane:
In order to get the from email address of a mail message into a CCK field we need to get it from the «from» imap_headerinfo (see #1391336: Garbled fromaddress with certain encodings). Note that if you try mapping the «from» to a CCK field now, you'll get a blank field.
According to the PHP documentation you left at #1391336: Garbled fromaddress with certain encodings, «from» has four properties: personal, adl, mailbox, and host. I don't know what «adl» is but I can easily imagine the use of mapping the «personal» element and having the name of the person who sent the email on a CCK field.
@Dane Powell in #1391336: Garbled fromaddress with certain encodings:
I can think of a few ways to deal with this. Mailhandler already extracts email addresses when you set the 'From' header, and in the authentication plugins. It could do that and provide it as a separate mapping source. Additionally, the 'from' header (see page above) is an array that I think has just the email address as one of it's components. We could provide each of these components as mapping sources, or I wonder if there's some way for a CCK field to handle the full array?
I think providing each of the properties of the «from» so that they could go to different CCK fields (like email address and name of the sender) would be the best option, if possible. Having it all in the same CCK field, even if possible, would limit the uses of this information (namely for rules, unique field and other modules).
Comments
Comment #1
danepowell commentedAgreed, I think the best thing to do is to split the IMAP header sources that are currently arrays into individual mapping sources.
Additionally, it might be good to rename them to something a little more intuitive than their default names.(done)I don't have time to work on this ATM, so someone else can submit a patch or I'll get to it when I get to it.
Comment #2
danepowell commentedhttp://drupalcode.org/project/mailhandler.git/commit/853e134
http://drupalcode.org/project/mailhandler.git/commit/a12e560