thoughtbot / griddler

Simplify receiving email in Rails (deprecated)
http://griddler.io/
MIT License
1.38k stars 199 forks source link

Cannot fetch the MIME information written between the boundary line and raw body #313

Closed RubyLucy closed 4 months ago

RubyLucy commented 5 years ago

UPDATED on Nov.14: The problem is as the title describes, the original post is just an example to explain how the problem impacts my case. The information ignored by griddler is the charset information in my example, it is written between the boundary line and email raw body.

Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit

Griddler can fetch the text written before the boundary line (in my example it's "----==_mimepart_5d679b0e8920c_bca3fe4beb466ac88238") as raw_header, and the text in email body (in my example it starts from the garbled text as you can see) as raw_body, but sometimes some emails like to put some texts between the boundary line and the raw body (In my example it is the charset information), and it cannot be fetched by griddler now.

The expectation is: DO NOT MISS ANY TEXT IN THE EMAIL SOURCE.

ORIGINAL POST:

Could somebody help fix this problem?


Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5d679b0e8920c_bca3fe4beb466ac88238"

----==_mimepart_5d679b0e8920c_bca3fe4beb466ac88238
Content-Type: text/plain;  charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

$B2q0w8BDj(IR0YO6^<^](B

8$B7n(B31$BF|$O(I"$BLn:Z$NF|(I#$B$G$9!#(I:=D:$B$G$O9qFb30$+$i?7A/$J(ILY(B-(IB$B!"Ln:Z$r<h$jB7$($F$$$^$9!#(B
GAP$BG'>Z$5$l$?>&IJ$r<h$j07$$$r=g<!3HBg$7$F$$$^$9!#>\$7$/$O$3$A$i$r%/%j%C%/(B (PC$B@lMQ(B)$B!#(B
RubyLucy commented 5 years ago

@christoomey Sorry for '@'ing you, but I think it's a more efficient way to solve this problem.

theasteve commented 4 years ago

@RubyLucy can you help me reproduce this issue. What is the Japanese text used on this email?

RubyLucy commented 4 years ago

@RubyLucy can you help me reproduce this issue. What is the Japanese text used on this email?

Hi Steven,

It has nothing to do with Japanese text or not. The problem is, as I wrote in the title, "Cannot fetch the MIME information written between the boundary line and raw body". Any information written between email boundary line and email raw body is IGNORED by griddler, in my example, it was the charset information as follows.

Content-Type: text/plain;  charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

I'm sorry that my example might have confused you, but it was just an example to describe the problem.