Files
componentowl-rails-archive/app/models/notifier.rb

50 lines
1.6 KiB
Ruby

class Notifier < ActionMailer::Base
helper :application, :notifier
default_url_options[:host] = Settings.host
def licenses(licenses)
subject "ComponentOwl.com - Generated Licenses"
from Settings.no_email
recipients Settings.feedback_email
sent_on Time.now
content_type "text/plain"
body :licenses => licenses
end
def survey(survey)
subject I18n.t('txt.survey.email_subject')
from "#{survey.full_name} <#{survey.current_email}>"
recipients Settings.feedback_email
sent_on Time.now
content_type "text/plain"
body :survey => survey
end
def recommend(email, survey)
subject I18n.t('txt.survey.recommend_email_subject', :name => survey.full_name)
from "#{survey.full_name} <#{survey.current_email}>"
recipients email
sent_on Time.now
content_type "text/plain"
body :survey => survey
end
def claim_upgrade(survey)
subject I18n.t('txt.survey.free_upgrade_email_subject')
from "#{survey.full_name} <#{survey.current_email}>"
recipients Settings.feedback_email
sent_on Time.now
content_type "text/plain"
body :survey => survey
end
def license_key_error(license_key)
subject "Generate license for order #{license_key.order_id} failed!"
from "Dextronet - License Key Error <error@dextronet.com>"
recipients Settings.license_key_error_email
sent_on Time.now
content_type "text/plain"
body :license_key => license_key
end
end