aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mail_handler/backends/mail_backend.rb
Commit message (Collapse)AuthorAgeLines
* Address#to_s changes the input passed to it - dup before calling.Louise Crow2015-05-28-3/+3
| | | | Otherwise UTF-8 encoded strings will be returned as ASCII-8BIT.
* Handle invalid 'to' addresses.Louise Crow2015-05-22-1/+1
|
* Add fix for Apple Mail with attachments Gareth Rees2014-11-04-0/+4
|
* Rename XXX comments with TODO:Gareth Rees2014-06-10-1/+1
| | | | Picks these up in `rake notes` and adds semantic meaning
* Change class for newer version of mail gem.Louise Crow2013-11-12-2/+2
|
* Fix a security vulnerability: eval used in quoting display name0.11.0.12Mark Longair2013-06-17-1/+1
| | | | | | | | | 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.
* Parse the 'to' address as if on a real mail to trigger quoted string encoding.Louise Crow2013-06-03-1/+3
|
* Move the mapi requires to where they're really neededMark Longair2013-05-22-0/+2
| | | | | | | 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.
* Retain old handling of malformed addresses in To and Cc linesMark Longair2013-05-21-0/+29
| | | | | | | | | | 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.
* Cope with emails with a missing final MIME boundaryMark Longair2013-05-17-2/+9
| | | | | | | | | | | | | | | 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
* Only set original_charset when a charset has been defined for the mail part. ↵Louise Crow2013-05-16-3/+8
| | | | Fixes #942.
* Make efforts to ensure that we're usually dealing with UTF-8 stringsMark Longair2013-05-16-1/+5
| | | | | | | | | 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.
* Ignore common TNEF attachment parsing errorsMark Longair2013-05-16-3/+8
| | | | | | | This also introduces a custom error class so that we don't accidentally catch other problems. Fixes #920
* Our older version of Mail returns a different class so cast it to a StringHenare Degan2013-02-21-1/+1
|
* We're using an older version of Mail that returns a different classHenare Degan2013-02-21-3/+3
|
* Calling TMail::Mail#base64_decode does not modify the mail object so doesn't ↵Matthew Landauer2013-01-28-2/+1
| | | | do anything as used here
* Add functions for basic mail handling to the mail backend of mail handler.Louise Crow2012-12-06-0/+199
|
* Convert address to string in the case where there's just an address.Louise Crow2012-12-05-1/+1
|
* Standardise on part as a param name, not mail_part.Louise Crow2012-12-05-4/+4
|
* Adding methods for getting the content type of a mail part, and getting ↵Louise Crow2012-12-04-0/+8
| | | | header strings from a mail.
* Add specs for getting name, email and formatted address - make them pass ↵Louise Crow2012-12-04-1/+1
| | | | with the mail backend.
* Add methods for finding out if there is an empty return path on a mail and ↵Louise Crow2012-12-04-0/+10
| | | | getting the auto-submitted field.
* Move method for getting the to, cc and envelope-to addresses of a mail to ↵Louise Crow2012-12-04-0/+7
| | | | the mail handler.
* Get name and address specs to pass under Ruby 1.9Louise Crow2012-12-03-5/+26
|
* Add some comments.Louise Crow2012-12-03-0/+1
|
* Move the specifics of getting a From: name from a mail to the mail handler.Louise Crow2012-12-03-0/+5
|
* Delegate getting the from address of an incoming mail to the mail handler.Louise Crow2012-12-03-0/+17
|
* Add method for getting the body of a mail part to mail handling modules.Louise Crow2012-11-29-0/+4
|
* Wrap address parsing in a address_from_string method in the mail handler.Louise Crow2012-11-15-0/+4
|
* Move address_from_name_and_email to mail handler.Louise Crow2012-11-15-0/+13
|
* Move _get_file_part_name to mail handler.Louise Crow2012-11-15-0/+7
|
* Move handling of TNEF mail attachments to mail handlerLouise Crow2012-11-15-0/+9
|
* Use mail handler for making mail objects of attached emails. Add a flag to ↵Louise Crow2012-11-15-1/+2
| | | | use base64 decoding or not. Note that currently the Mail-based backend doesn't use it - I think that eventually we'll want to have the mail handler wrap the mail object with it's own interface.
* Add methods for both backends to generate a mail object from raw data.Louise Crow2012-11-15-0/+5
|
* First skeletal version of separate mail handling library.Louise Crow2012-11-15-0/+12