diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-05-22 15:29:34 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-06-04 15:53:29 +0100 |
commit | b4990dc4d63d7035ae0cd42f0e52150611162f3d (patch) | |
tree | 4e7bd0daf9ba0b695e16c05d3cad5e4c8821cef5 /script/handle-mail-replies.rb | |
parent | cae5b0aa950cf230a15eeca70a28c6f3c0a3db5c (diff) |
Handle unparsed email contents as binary.
I think I was wrong in a83b379fd2d676172855825d0592937b234371e2 in
assuming that all email gets properly encoded for transfer. Looking
at the mail gem load method
https://github.com/mikel/mail/blob/b159e0a542962fdd5e292a48cfffa560d7cf412e/lib/mail/mail.rb#L175a,
it reads raw email content from a file in binary mode. So this commit
makes both reading and writing the raw_email a binary mode operation
and adds a data_as_text method for displaying the data in the admin
interface that coerces it to valid utf-8.
Diffstat (limited to 'script/handle-mail-replies.rb')
0 files changed, 0 insertions, 0 deletions