diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-07-29 11:08:21 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-07-29 11:08:21 +0100 |
commit | b17910d494ae1a459c83b43e4b668ca4e80fc680 (patch) | |
tree | 124334762f145918456f668ccea65ae824939132 /lib/mail_handler/backends/mail_extensions.rb | |
parent | 1c9b3a8a4a441287cd607bb753661710f16a083a (diff) | |
parent | d12c1e0ae5fc9a4beca05d62166a41ef6e657203 (diff) |
Merge branch 'hotfix/0.12.0.1' into rails-3-develop
Conflicts:
locale/he_IL/app.po
locale/nb_NO/app.po
Diffstat (limited to 'lib/mail_handler/backends/mail_extensions.rb')
-rw-r--r-- | lib/mail_handler/backends/mail_extensions.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/mail_handler/backends/mail_extensions.rb b/lib/mail_handler/backends/mail_extensions.rb index a5b6bc97e..029331802 100644 --- a/lib/mail_handler/backends/mail_extensions.rb +++ b/lib/mail_handler/backends/mail_extensions.rb @@ -46,6 +46,15 @@ module Mail self end + + def set_envelope_header + raw_string = raw_source.to_s + if match_data = raw_source.to_s.match(/\AFrom\s(#{TEXT}+)#{CRLF}/m) + set_envelope(match_data[1]) + self.raw_source = raw_string.sub(match_data[0], "") + end + end + end # A patched version of the parameter hash that handles nil values without throwing |