Index: /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py	(revision 7364)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py	(revision 7365)
@@ -51,5 +51,5 @@
 from waeup.sirp.interfaces import (
     ISIRPObject, ILocalRolesAssignable, IExtFileStore,
-    IFileStoreNameChooser, IPasswordValidator, IUserAccount)
+    IFileStoreNameChooser, IPasswordValidator, IUserAccount, ISIRPUtils)
 from waeup.sirp.permissions import get_users_with_local_roles
 from waeup.sirp.students.viewlets import PrimaryStudentNavTab
@@ -1089,20 +1089,4 @@
         return image
 
-class ApplicantRegistrationSuccessful(SIRPPage):
-    """Info page when applicant registration was successful.
-    """
-    grok.context(IApplicantsContainer)
-    grok.name('register_success')
-    grok.require('waeup.Public')
-    grok.template('applicantregister_succ')
-    label = 'Applicant Registration Successful'
-    title = label
-
-    def update(self, app_id=None):
-        if app_id is None:
-            self.redirect(self.url(self.context, 'register'))
-        self.app_id = app_id
-        self.login_url = self.url(grok.getSite(), 'login')
-
 class ApplicantRegistrationPage(SIRPAddFormPage):
     """Captcha'd registration page for applicants.
@@ -1131,23 +1115,24 @@
             # No need to flash something.
             return
-
-        # handle password field manually
-        form = self.request.form
-        password = form.get('password', None)
-        password_ctl = form.get('control_password', None)
-        if password:
-            validator = getUtility(IPasswordValidator)
-            errors = validator.validate_password(password, password_ctl)
-            if errors:
-                self.flash( ' '.join(errors))
-                return
-
-        # add applicant and redirect to success page
+        sirp_utils = getUtility(ISIRPUtils)
+        # Add applicant and create password
         applicant = createObject('waeup.Applicant')
         self.applyData(applicant, **data)
         self.context.addApplicant(applicant)
-        IUserAccount(applicant).setPassword(password)
-        app_id = applicant.applicant_id
-        self.redirect(self.url(self.context, 'register_success',
-                               data=dict(app_id=app_id)))
-        return
+        pwd = sirp_utils.genPassword()
+        IUserAccount(applicant).setPassword(pwd)
+        # Send email with credentials
+        username = applicant.applicant_id
+        fullname = applicant.display_fullname
+        subject = 'Your SIRP credentials'
+        msg = 'You have successfully registered for the'
+        email_to = applicant.email
+        login_url = self.url(grok.getSite(), 'login')
+        success = sirp_utils.sendPassword(fullname,msg,username,
+            pwd,login_url,email_to,subject)
+        if success:
+            self.flash('An email with your user name and password' +
+                'has been sent to %s.' % email_to)
+        else:
+            self.flash('An smtp server error occurred.')
+        return
Index: /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantregister.pt
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantregister.pt	(revision 7364)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantregister.pt	(revision 7365)
@@ -38,20 +38,8 @@
         </tr>
       </tal:block>
-      <tr>
-        <td class="label"><label i18n:translate="">Password:</label></td>
-        <td>
-          <input name="password" type="password"  />
-        </td>
-      </tr>
-      <tr>
-        <td class="label"><label i18n:translate="">Retype password:</label></td>
-        <td>
-          <input name="control_password" type="password" />
-        </td>
-      </tr>
-      <tr>
+      <tr tal:condition="view/captcha_code">
         <td i18n:translate="">
           Please solve the captcha<br />
-          to prevent misuse of this service
+          to prevent misuse of this service:
         </td>
         <td>
Index: in/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantregister_succ.pt
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantregister_succ.pt	(revision 7364)
+++ 	(revision )
@@ -1,17 +1,0 @@
-<h2 i18n:translate="">
-  Your registration was successful.
-</h2>
-<div i18n:translate="">
-  You might proceed by <a i18n:translate="" href=""
-  tal:attributes='href view/login_url'>logging in</a> now with the
-</div>
-<div i18n:translate="">
-  <b>Applicant ID <span tal:replace="view/app_id">APP_ID</span></b>
-</div>
-<div i18n:translate="">
-  and the password you picked.
-</div>
-<div i18n:translate="">
-  Please remember your applicant id (it is your username) and keep
-  your password secret!
-</div>
Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py	(revision 7364)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py	(revision 7365)
@@ -186,7 +186,7 @@
         d = {}
         d['error'] = u''
-        site_confoguration = grok.getSite()['configuration']
-        d['booking_session'] = site_confoguration.accommodation_session
-        d['allowed_states'] = site_confoguration.accommodation_states
+        site_configuration = grok.getSite()['configuration']
+        d['booking_session'] = site_configuration.accommodation_session
+        d['allowed_states'] = site_configuration.accommodation_states
         # Determine bed type
         studycourse = student['studycourse']
Index: /main/waeup.sirp/trunk/src/waeup/sirp/utils/utils.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/utils/utils.py	(revision 7364)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/utils/utils.py	(revision 7365)
@@ -20,5 +20,6 @@
 import grok
 import smtplib
-from string import capwords
+import string
+from random import SystemRandom as r
 from email.mime.text import MIMEText
 from waeup.sirp.interfaces import ISIRPUtils
@@ -58,5 +59,45 @@
         # We do not necessarily have the middlename attribute
         if middlename:
-            return capwords('%s %s %s' % (firstname, middlename, lastname))
+            return string.capwords(
+                '%s %s %s' % (firstname, middlename, lastname))
         else:
-            return capwords('%s %s' % (firstname, lastname))
+            return string.capwords(
+                '%s %s' % (firstname, lastname))
+
+    def genPassword(self, length=8, chars=string.letters + string.digits):
+        return ''.join([r().choice(chars) for i in range(length)])
+
+    def sendPassword(self,fullname,msg,username,password,login_url,
+                 email_to,subject):
+        """Send an email with user credentials.
+        """
+        config = grok.getSite()['configuration']
+        text = """Dear %s,
+
+%s
+Student Registration and Information Portal of
+%s
+
+Your user name is: %s
+Your password is: %s
+Login page: %s
+
+Please remember your user name and keep
+your password secret!
+
+Regards
+"""
+        msg = MIMEText(text % (fullname,msg,config.name,username,password,login_url))
+        msg['From'] = '%s <%s>' % (config.name_admin,config.email_admin)
+        msg['To'] = email_to
+        msg['Subject'] = subject
+        server = smtplib.SMTP(config.smtp_server)
+        if config.smtp_requires_login:
+            server.login(config.smtp_username,config.smtp_password)
+        try:
+            server.sendmail(config.email_admin,email_to,msg.as_string())
+        except:
+            return False
+        server.quit()
+        return True
+
