class Podgraph::MailGenerator

Public Class Methods

new(tr, recipients = []) click to toggle source
# File podgraph.rb, line 75
def initialize tr, recipients = []
  @tr = tr
  @mail = Mail.new
  @mail.to = recipients
  @mail.subject = tr.subject
  tr.images.empty? ? simple : multipart_related
end

Public Instance Methods

simple() click to toggle source
# File podgraph.rb, line 85
def simple
  @mail.content_disposition 'inline'
  @mail.content_type 'text/html; charset="UTF-8"'
  @mail.body @tr.html
end
to_s() click to toggle source
# File podgraph.rb, line 83
def to_s; @mail.to_s; end