blob: 06a115c5bdcce8ddfac372291d6e6229ad32c45f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# models/user_mailer.rb:
# Emails relating to user accounts. e.g. Confirming a new account
#
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
# $Id: user_mailer.rb,v 1.8 2009-02-09 10:37:12 francis Exp $
class UserMailer < ApplicationMailer
def confirm_login(user, reasons, url)
@from = contact_from_name_and_email
headers 'Return-Path' => blackhole_email, 'Reply-To' => @from # we don't care about bounces when people are fiddling with their account
@recipients = user.name_and_email
@subject = reasons[:email_subject]
@body[:reasons] = reasons
@body[:name] = user.name
@body[:url] = url
end
def already_registered(user, reasons, url)
@from = contact_from_name_and_email
headers 'Return-Path' => blackhole_email, 'Reply-To' => @from # we don't care about bounces when people are fiddling with their account
@recipients = user.name_and_email
@subject = reasons[:email_subject]
@body[:reasons] = reasons
@body[:name] = user.name
@body[:url] = url
end
end
|