Main Avalanche Network server application. Built with Ruby on Rails.

user_mailer.rb 1.1KB

    class UserMailer < ActionMailer::Base include Roadie::Rails::Automatic default from: "mission_control@avalanche.network" def signup_message(user) I18n.with_locale(user.language) do config = Info.first mail :to => user.email, :subject => (t 'sign_up_email.email_subject'), :from => 'mission_control@avalanche.network', :from_name => 'Avalanche Network' end end def contact_message(contact_message, to_address) @msg = contact_message mail :to => to_address, :subject => @msg.title, :from => @msg.user == nil ? @msg.email : @msg.user.email, :from_name => @msg.user != nil ? @msg.user.full_name : @msg.email, :body => @msg.content end def newsletter_subscription(subscription) config = Info.first mail :to => subscription.email, :subject => (t 'newsletter_subscription.subject'), :from => config.contact_email, :from_name => config.website_name, :body => (t 'newsletter_subscription.message') end end