author | Madhusudan.C.S <madhusudancs@gmail.com> |
Wed, 21 Jul 2010 17:02:10 +0530 | |
changeset 146 | e23e937ddcda |
parent 94 | 87e77aa18610 |
child 174 | ccd1a896dfea |
permissions | -rw-r--r-- |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
1 |
from django.core.mail import EmailMessage |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
2 |
|
146
e23e937ddcda
Removed unwanted mail texts and made the texts scope compliant.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
3 |
|
e23e937ddcda
Removed unwanted mail texts and made the texts scope compliant.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
4 |
def send_confirmation(registrant, event): |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
5 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
6 |
message = EmailMessage() |
146
e23e937ddcda
Removed unwanted mail texts and made the texts scope compliant.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
7 |
message.subject = u'Registration to %s' % (event.get_full_name()) |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
8 |
message.from_email = u'admin@scipy.in' |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
9 |
message.to = [registrant.email] |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
10 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
11 |
username = registrant.username |
146
e23e937ddcda
Removed unwanted mail texts and made the texts scope compliant.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
12 |
all = {'name': registrant.get_full_name(), |
e23e937ddcda
Removed unwanted mail texts and made the texts scope compliant.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
13 |
'username': username, |
e23e937ddcda
Removed unwanted mail texts and made the texts scope compliant.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
14 |
'event_name': event.get_full_name(), |
e23e937ddcda
Removed unwanted mail texts and made the texts scope compliant.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
15 |
'event_scope': event.scope, |
e23e937ddcda
Removed unwanted mail texts and made the texts scope compliant.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
16 |
} |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
17 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
18 |
message.send() |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
19 |
|
146
e23e937ddcda
Removed unwanted mail texts and made the texts scope compliant.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
20 |
confirmation_newuser = """Dear %(name)s, |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
21 |
|
146
e23e937ddcda
Removed unwanted mail texts and made the texts scope compliant.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
22 |
Welcome to %(event_name)s. You have registered for %(event_name)s with the |
e23e937ddcda
Removed unwanted mail texts and made the texts scope compliant.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
23 |
username %(username)s. You may log in to the %(event_name)s website at |
e23e937ddcda
Removed unwanted mail texts and made the texts scope compliant.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
24 |
http://scipy.in/%(event_scope)s/login using the given username |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
25 |
|
146
e23e937ddcda
Removed unwanted mail texts and made the texts scope compliant.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
26 |
Thank you for your registration! Looking forward to meet you at %(event_name)s. |
94
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
27 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
28 |
Regards, |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
29 |
The SciPy.in Team |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
30 |
|
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
31 |
If you lose your password to the website please visit: |
87e77aa18610
Moved the files to new Django app named scipycon and modified settings.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
32 |
http://scipy.in/password-reset |
146
e23e937ddcda
Removed unwanted mail texts and made the texts scope compliant.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
94
diff
changeset
|
33 |
""" |