Page MenuHomePhabricator

Inbound email kind-of working (but kind of only).
Closed, ResolvedPublic

Description

It's neither import nor difficult to fix i think but with HTML mail (not tested with plain Text) the email is parsed like this :

PROPERTIES
ID: 5
Status:
Related PHID: PHID-TASK-random1
Author PHID: PHID-USER-random2
Message ID Hash:

MESSAGE
OK

HEADERS

to: T13+public+random@a.a.info

from: Me <its.me@mario>

subject: Re: [Maniphest] [Commented On] T13: Test Inbound :)

BODIES
Body "text"
It wasn't working, isn it ?

2015-05-14 19:34 GMT+02:00 Me <its.me@mario>:

Body "html"
<html><body><div dir="ltr">It wasn't working, isn it ?</div><div class="gmail_extra"><br><br></div></body </html>

ATTACHMENTS
No attachments.

And thus the task comment created contains :

Does it works now ?
2015-05-14 19:34 GMT+02:00 Me <its.me@mario>

The proposed fix is to improve the parser so it can flush the second line.
Do you guys thinks its hard to do ? Worth spending time on it ?

Revisions and Commits

Event Timeline

tycho.tatitscheff raised the priority of this task from to Normal.
tycho.tatitscheff updated the task description. (Show Details)

What mail client did you use to send that mail?

Why does the mail have completely different text in the HTML and text bodies?

It was sended directly from gmail Web-UI.
Sorry for difference in text and html, I was translating (was french) and making it anonyme but I failed to do it correctly.
Task edited with something more coherant.

I will try to test sending it from thunderbird.

So it is even worse :

Body "text"
Testing again.

Le 14/05/2015 20:18, xxx (yyy zzz) a écrit :

Body "html"
<p>Testing again.

Le 14/05/2015 20:18, xxx (yyy zzz) a écrit :</p>

producing the same result but this time their is no way to determine what is right and what is from thunderbird.

Is "2015-05-14 19:34 GMT+02:00 Me <its.me@mario>" a standard header for Gmail quoted text in French? Is it a standard signature? I'm confused because neither of your examples actually contain any quoted text.

It looks like "Le 14/05/2015 20:18, xxx (yyy zzz) a écrit :" is how Thunderbird does it? Is it standard to have a space before the colon? That one at least looks like a quote header, but it's similarly confusing because there's no quoted text.

We're happy to add patterns to strip non-English quoted text and signatures, I just want to make sure that we're stripping standard headers added by clients in widespread use rather than custom things that individual users have configured.

By switching Gmail to French, I get this header for quoted text:

2015-05-06 11:21 GMT-07:00 Mailgun <hello@mail.mailgun.com>:

(Particularly, note the trailing colon which is not present in your example -- did you remove it?)

They are both header for quoted text. I didn't configure anything.

2015-05-06 11:21 GMT-07:00 Mailgun <hello@mail.mailgun.com>:

(Particularly, note the trailing colon which is not present in your example -- did you remove it?)

Indeed. Sorry.