Class: MultiMail::Message::Base

Inherits:
Mail::Message
  • Object
show all
Defined in:
lib/multi_mail/message/base.rb

Direct Known Subclasses

Mailgun, Mandrill, SendGrid

Instance Method Summary collapse

Instance Method Details

#body_htmlObject



9
10
11
12
13
14
15
# File 'lib/multi_mail/message/base.rb', line 9

def body_html
  if html_part
    html_part.body.decoded
  elsif html?
    body.decoded
  end
end

#body_textObject



17
18
19
20
21
22
23
# File 'lib/multi_mail/message/base.rb', line 17

def body_text
  if text_part
    text_part.body.decoded
  elsif !html?
    body.decoded
  end
end

#html?Boolean



5
6
7
# File 'lib/multi_mail/message/base.rb', line 5

def html?
  !!content_type && content_type.include?('text/html')
end