Sending mails.
--- a/app/projrev/views/login.py Fri Aug 07 03:56:08 2009 +0530
+++ b/app/projrev/views/login.py Fri Aug 07 04:13:53 2009 +0530
@@ -55,6 +55,19 @@
try:
user = User.objects.create_user(username, username, password)
user.save()
+ subject = "[Sakshath] Registration at Saskshath portal"
+ message = """Hi,
+ We have received a request for registration of your
+ email address, "%s", to the http://sakshath.ac.in mailing list.
+ \n\n
+ Your login credentials are:\n
+ username: %s\n
+ password: %s\n\n\n
+ Regards,
+ Saksath admin
+ """ % (username, username, password)
+
+ user.email_user(subject=subject, message=message)
context = {
'created': True,
'username': username,
--- a/app/settings.py Fri Aug 07 03:56:08 2009 +0530
+++ b/app/settings.py Fri Aug 07 04:13:53 2009 +0530
@@ -9,6 +9,8 @@
('Madhusudan.C.S', 'madhusudancs@gmail.com'),
)
+DEFAULT_FROM_EMAIL = 'admin@sakshath.ac.in'
+
MANAGERS = ADMINS
DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.