I can verify, using 6.x-2.x-dev that commands are stripped out of emails as long as they are sent as plain text. But for emails sent as HTML or rich text (from MS Outlook, at least), the commands are not processed or stripped. This is true no matter whether the Feed Importer's Node Processor is set to use an Input format of Default, Full HTML, or Filtered HTML.
Comments
Comment #1
danepowell commentedThanks, I'll have to take a closer look at this.
Comment #2
squinternata commentedi have the same problem but with a recommended version..6.x-1.11
but actually i m using outlook 2002 and my emails are not stripped..
someone can help me?
thanks
A
Comment #3
ilo commentedI can't take a look right now, but I'll work on it in the following days. I don't have an outlook 2002 to make a test. In the meantime, if you want, please, post the full source of an email sent with outlook 2002 (removing sensitive data) so I can try to guess the problem.
Comment #4
Raul Cano commentedHi,
I came across the same problem using Mailhandler 6.x-1.11 and sending my emails from gmail (with the rich text enabled). To solve this, I made my own function to parse the commands, which I paste below. I just replaced the original code with my code, though I guess this is not the most orthodox way (suggestions are welcome).
Some considerations:
1.- Now, the commands must be between the tags ##COMMANDS_START## and ##COMMANDS_END##.
2.- Every command, even the default ones, must now be preceded by the characther "-" (no quotes).
This is how it would look like:
##COMMANDS_START##
-taxonomy: [term1,term2]
-type: wiki
-og_groups: [307]
-og_public: 0
##COMMANDS_END##
Email text here.
And this is the function I made, replacing the one in the file mailhandler.retrieve.inc:
So, as I said, this may be a bit dirty solution, but it works really fine.
I hope it helps.
Have a nice day!
Comment #5
danepowell commentedThis will be fixed in 6.x-2.x before 6.x-1.x
Comment #6
danepowell commentedI am not able to reproduce this in 6.x-2.x. If you are still having this issue with 6.x-2.x-dev, please post a sample message. Here is the message I used (from gmail - sensitive headers removed):
Comment #7
Anonymous (not verified) commentedHi all
Same for 7.2.x
:-(
Best regards
ArchGalileu
Comment #8
danepowell commented@ArchGalileu - see my post #6 - please post an example problematic message. Otherwise I have no way of reproducing or troubleshooting this.
Comment #9
MtRoxx commentedI am having this same issue. Below are the headers. I tested this with just the Test, not formatted, worked great. When I put the second Test as bold, the tid:22 showed up in the node. Any suggestions would be appreciated.
Subject:Fitness Center
From:"My Name"
Date:11/15/2011 3:28 PM
To:toemail@communitywebsite.com
Message-ID:<4EC2E7A3.70103@mywebsite.com>
Reply-To:email@mywebsite.com
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version:1.0
Content-Type:multipart/alternative; boundary="------------000002080106040601000109"
tid: 22
Test
Test
Comment #10
danepowell commented@Mt_Roxx - that is still not helpful... I need the problematic message, i.e. the one where you said "Test" is bold, and I need the entire message including headers. For instance, in gmail, click the arrow to the right of the message and "show original".
At any rate, I have a hunch as to why this is happening. If you don't put the commands on the very first line of the message or if your mail client does screwy stuff like inserting junk HTML before the first line of content, AND your client does not insert newlines but only HTML breaks, then this can happen.
Possible workarounds for you to try...
Possible solutions to think about for Mailhandler (none of them pretty...)
Comment #11
Anonymous (not verified) commentedHi @Dane Powell
For some reason the taxonomy,
obras: [bla,bla]is not created and body as the*and not the htmlHere is my original:
Best regards
ArchGalileu
Comment #12
danepowell commentedThanks @ArchGalileu, that confirms my suspicions in #10. As a workaround I suggest setting the mailbox to use "plain text" for the node body.
Comment #13
danepowell commentedI think the way to implement this is to use the plain text part to find the commands, then search for the same commands in the html part and use an HTML parser to eliminate all of the immediately enclosing tags. It might take some work to get right, but I don't see any better option.
Comment #14
danepowell commentedOkay, first this needs to happen: #1370096: Remove 'MIME preference' from Mailbox config, change 'Body' mapping source
Then, we can get the commands from the plain-text part, and search for the first occurrences of the same commands in the HTML body and remove them. Finally, for n commands, we can remove the first n line breaks (
<br*>).It's not perfect, but I *think* it will work.
Comment #15
danepowell commentedComment #16
danepowell commentedhttp://drupalcode.org/project/mailhandler.git/commit/3848642
http://drupalcode.org/project/mailhandler.git/commit/8b6c6ee