Hi, I find MailhandlerCommandsDefault.class.php get the Commands with regular expression.

that is good, but unfortunately the my mbox message has Date keys, it overwrite the header keys. my mail body field is :

Date:21/09/2006 URL:
http://www.thehindu.com/2006/09/21/stories/2006092102911000.htm
--------------------------------------------------------------------------------
Opinion - Leader Page Articles

and the commands get Date "21/09/2006", but it was not recognized by Feeds module, Feeds mapper Date field needs Date Time zone, format is like the mail header Date value "Thu, 21 Sep 2006 19:52:33 +0530"

So I suggest the body commands shouldn't overwrite the header keys.

I will attach the Patch the next message.

CommentFileSizeAuthor
#1 1812378-fix_body_field_command.patch658 byteslixiphp
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lixiphp’s picture

Status: Active » Patch (to be ported)
FileSize
658 bytes

the Patch to do is adding the message keys when the key don't exist.

Dane Powell’s picture

Status: Patch (to be ported) » Needs review
kscheirer’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

That seems reasonable, is there ever a case where you would want a command to overwrite a header?

Dane Powell’s picture

Status: Reviewed & tested by the community » Fixed

http://drupalcode.org/project/mailhandler.git/commit/8b6fc3e
http://drupalcode.org/project/mailhandler.git/commit/75cf60a

Seems reasonable. It's hard to guess what kind of workflows people might use- they could certainly want to overwrite message headers. But I imagine it's pretty rare. And the alternative is sort of non-intuitive / hard to define (the result depends on whether the Header command processor runs before or after the Default command processor, for instance).

By the way, it's hard to understand from the OP, but it sounds like your problem might also be solved by #2116975: Only strip allowed commands

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.