Method: Eye::Notify::Mail#message

Defined in:
lib/eye/notify/mail.rb

#messageObject



38
39
40
41
42
43
44
45
46
# File 'lib/eye/notify/mail.rb', line 38

def message
  h = []
  h << "From: #{from_name} <#{from_mail || user}>" if from_mail || user
  h << "To: <#{contact}>"
  h << "Subject: #{message_subject}"
  h << "Date: #{msg_at.httpdate}"
  h << "Message-Id: <#{rand(1_000_000_000).to_s(36)}.#{$$}.#{contact}>"
  "#{h * "\n"}\n#{message_body}"
end