diff options
-rw-r--r-- | app/models/contact_mailer.rb | 12 | ||||
-rw-r--r-- | app/views/contact_mailer/from_admin_message.rhtml | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/app/models/contact_mailer.rb b/app/models/contact_mailer.rb index 74c213c7a..800fe54e4 100644 --- a/app/models/contact_mailer.rb +++ b/app/models/contact_mailer.rb @@ -42,4 +42,16 @@ class ContactMailer < ApplicationMailer } end + # Send message to a user from the administrator + def from_admin_message(recipient_user, subject, message) + @from = contact_from_name_and_email + @recipients = recipient_user.name_and_email + @subject = subject + @body = { + :message => message, + :from_user => @from, + :recipient_user => recipient_user, + } + end + end diff --git a/app/views/contact_mailer/from_admin_message.rhtml b/app/views/contact_mailer/from_admin_message.rhtml new file mode 100644 index 000000000..bdb48d580 --- /dev/null +++ b/app/views/contact_mailer/from_admin_message.rhtml @@ -0,0 +1,2 @@ +<%= @message.strip %> + |