reg/events.py
changeset 98 1af134a1e53d
parent 84 bb6a1bd4b3f8
--- a/reg/events.py	Sat Apr 17 14:59:58 2010 +0530
+++ b/reg/events.py	Fri Apr 23 16:35:42 2010 +0530
@@ -100,6 +100,24 @@
     new_password = gen_key(10)
     user.set_password(new_password)
     user.save()
+
+    subject = "Password on FOSSEE registration"
+    message = """
+    Dear %s,
+
+    Your new password is "%s".
+    This password can be changed using the "change password" link available in "My Profile" page after you login.
+ 
+    Please mail your queries and complaints to admin@fossee.in.
+
+    If you have not registered at fossee, please ignore this mail.
+
+    Regards,
+    FOSSEE Team
+    """%(user.get_full_name(), new_password)
+
+    send_mail(subject, message, "admin@fossee.in", [user.email])
+
     return new_password
 
 def change_password(user, new_password):