module C80Callback class CallbacksMailer < ActionMailer::Base default from: Proc.new { SiteProp.first.mail_from }, to: Proc.new { SiteProp.first.mail_to } def send_email(message, subject) @message = format_message(message) puts ' Отправляем сообщение.' mail(subject: subject) do |format| format.html { render 'mail_letter' } end #puts "#{SiteProps.first.mail_to}" end private def format_message(message) result = "
• Имя: #{message.name}" result += "
• Email: #{message.mobile}" result end end end