| Commit message (Collapse) | Author | Age | Lines |
|
|
|
| |
Otherwise UTF-8 encoded strings will be returned as ASCII-8BIT.
|
| |
|
| |
|
| |
|
|
|
|
| |
Picks these up in `rake notes` and adds semantic meaning
|
| |
|
|
|
|
| |
Taken from https://github.com/mikel/mail/pull/602
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a fix for issue #1232. Richard Taylor pointed
out that some PDF attachments had the non-standard content-type
document/pdf, and that these weren't being treated as PDFs.
(Ganesh Sittampalam discovered that all of these PDFs were
generated by a Lexmark X945e, according to the PDF metadata.)
This commit adds an extra case to normalise_content_type to map
document/pdf to application/pdf.
In fact, since the upgrade of the Mail gem in ccebe3c3d6d4dc5f81
the behaviour when handling the non-standard content-type
document/pdf was much better, but this commit also means that
you get the right icon for the attachment, and can be
cherry-picked onto older versions to fix #1232.
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| | |
Conflicts:
locale/he_IL/app.po
locale/nb_NO/app.po
|
| |
| |
| |
| | |
errors when parsing large mails with envelopes on memory limited systems.
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
| |
This use of eval allows arbitrary remote code execution on
parsing of a maliciously formed email.
Two tests are updated to match the behaviour of the new
code to return the display name - these introduce extra
escaping, so should be innocous.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This seems to be the bug mentioned here:
http://po-ru.com/diary/fixing-invalid-utf-8-in-ruby-revisited/
That explains that some versions of Iconv don't ignore
invalid characters when converting to UTF-8 even with
//IGNORE if that invalid character happens to be at the end
of the string. In fact, as Matthew Somerville pointed out,
with some versions of iconv (e.g. 1.14 on Mac OS, apparently)
it's necessary to add and remove more than one space at the end,
in case the first character of the byte sequence indicates a
long sequence. We add and remove 4 to be on the safe side.
|
|\
| |
| |
| |
| |
| |
| |
| | |
This merge brings in a number of tests and fixes for the handling
of mail under Mail / Rails 3 instead of TMail / Rails 2.
Conflicts:
config/initializers/alaveteli.rb
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Handling of outlook-packed attachments would fail from
rake tasks or in the console without requiring 'mapi/msg'
and 'mapi/convert' beforehand. Instead, require them in
the source file where they're actually used.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The behaviour of the TMail backend's 'to' and 'cc' methods
where there was a malformed To: or Cc: line was to return
nil, whereas Mail returns a version of the string anyway.
We'd have to change quite a lot of code to deal with an
extra possible class of returned objects, so it's simplest
for the moment to monkey-patch Mail::Message's 'to' and 'cc'
methods to restore the old behaviour.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The Mail gem deals with multipart messages that look as if
they should have 1 part but are missing the final MIME boundary,
by make the parts list empty and setting part.body to the
text of the email. Rather than throwing an exception in this
case, we just pretend that part is text/plain and return it, so
that the page doesn't error and we still have a chance of some
useful text being displayed.
Note that we haven't investigated yet the case of emails that
have more than one start boundary, but no final boundary.
Fixes #921
|
| |
| |
| |
| | |
Fixes #942.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
One of these changes is to make sure that the Mail backend,
like the TMail backend it replaces, will return text parts
encoded in UTF-8 if possible.
The other change is to ensure that when text attachments are
reloaded from disk, we attempt to convert them to UTF-8.
|
| |
| |
| |
| |
| |
| |
| | |
This also introduces a custom error class so that we don't
accidentally catch other problems.
Fixes #920
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The use of backticks in `which tnef` means that which(1) is
invoked under /bin/sh, and returns the first executable
matching 'tnef' in the default PATH for /bin/sh. In this
usage, however, Popen also uses /bin/sh to execute the
command, which would run that same executable if just a
bare 'tnef' were used. In summary, I can't see any reason
for the convolution of:
IO.popen("#{`which tnef`.chomp} -K -C #{dir}", "wb") do |f|
... over just:
IO.popen("tnef -K -C #{dir}", "wb") do |f|
... so switch to the latter.
|
|\ \
| |/
|/|
| |
| |
| |
| | |
Conflicts:
Rakefile
app/models/contact_mailer.rb
spec/models/contact_mailer_spec.rb
|
| | |
|
| |
| |
| |
| | |
do anything as used here
|
| |
| |
| |
| |
| | |
The rails upgrade also forces a mail gem upgrade. To make things work again
we need to remove part of the monkeypatched backporting of encoding fixes.
|
| |
| |
| |
| | |
Decoding messages in Ruby 1.9 was screwing up but not dying like 1.8. Backporting this fixes the problem.
|
| |
| |
| |
| | |
This reverts commit b9a2d996408c1ef703aa78311f8c2a0f6e0d7afc.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
| |
do anything as used here
|
| |
|
|
|
|
|
|
| |
Conflicts:
lib/mail_handler/backends/tmail_backend.rb
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
get_attachment_text_one_file as it is now an externally-accessed method of the mail handler module.
|
| |
|