aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/contact_mailer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/contact_mailer.rb')
-rw-r--r--app/models/contact_mailer.rb16
1 files changed, 14 insertions, 2 deletions
diff --git a/app/models/contact_mailer.rb b/app/models/contact_mailer.rb
index 0390fc347..800fe54e4 100644
--- a/app/models/contact_mailer.rb
+++ b/app/models/contact_mailer.rb
@@ -25,7 +25,7 @@ class ContactMailer < ApplicationMailer
# they shouldn't, and this might help. (Have had mysterious cases of a
# reply coming in duplicate from a public body to both From and envelope
# from)
-
+
# Send message to another user
def user_message(from_user, recipient_user, from_user_url, subject, message)
@from = from_user.name_and_email
@@ -34,7 +34,7 @@ class ContactMailer < ApplicationMailer
headers 'Return-Path' => blackhole_email, 'Reply-To' => @from
@recipients = recipient_user.name_and_email
@subject = subject
- @body = {
+ @body = {
:message => message,
:from_user => from_user,
:recipient_user => recipient_user,
@@ -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