Skip to content

Tiny bug (fix) in entity_tmail.rb's from_tmail(tmail) #6

LouisStAmour opened this Issue Apr 26, 2010 · 0 comments

1 participant


Seems there are instance variables in this method where there shouldn't be. Replace each so the method looks like this and you won't get any whiny nil errors about nil.header calls:

def from_tmail(tmail)
  raise ArgumentError, "Expecting a TMail::Mail object." unless tmail.is_a?(TMail::Mail)
  @headers ||= {|h,k| tmail.header[k].to_s }
  if multipart?
    @content = { |tpart| }
    set_content tmail.body # TMail has already decoded it, but we need it still encoded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.