Class: RedhatAccess::InsightsMailer

Inherits:
ApplicationMailer
  • Object
show all
Defined in:
app/mailers/redhat_access/insights_mailer.rb

Instance Method Summary collapse

Instance Method Details

#create(user, body, subject, content_type = "text/html") ⇒ Object



4
5
6
7
8
9
# File 'app/mailers/redhat_access/insights_mailer.rb', line 4

def create(user, body, subject, content_type="text/html")
  mail(to: user.mail,
       body: body,
       content_type: content_type,
       subject: subject)
end

#weekly_email(user, data, subject, org) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'app/mailers/redhat_access/insights_mailer.rb', line 11

def weekly_email(user, data, subject, org)
  @user = user
  @data = data
  @org  = org
  @server_url = "#{Setting[:foreman_url]}/redhat_access/insights"
  @email_settings_url = "#{Setting[:foreman_url]}/users/#{user.id}/edit#mail_preferences"
  mail(to: user.mail,
       subject: subject)

end