Index: /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py	(revision 7379)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py	(revision 7380)
@@ -1134,5 +1134,5 @@
         return
 
-    @grok.action('Send login credentials')
+    @grok.action('Get login credentials')
     def register(self, **data):
         if not self.captcha_result.is_valid:
@@ -1140,24 +1140,48 @@
             # No need to flash something.
             return
-        sirp_utils = getUtility(ISIRPUtils)
         # Add applicant and create password
         applicant = createObject('waeup.Applicant')
         self.applyData(applicant, **data)
         self.context.addApplicant(applicant)
-        pwd = sirp_utils.genPassword()
-        IUserAccount(applicant).setPassword(pwd)
+        password = getUtility(ISIRPUtils).genPassword()
+        IUserAccount(applicant).setPassword(password)
         # Send email with credentials
+        if self.sendCredentials(applicant, password):
+            self.redirect(self.url(self.context, 'registration_complete',
+                                   data = dict(email=applicant.email)))
+            return
+        else:
+            self.flash('Email could not been sent. Please retry later.')
+        return
+
+    def sendCredentials(self, applicant, password):
+        """Send credentials as email.
+
+        Input is the applicant for which credentials are sent and the
+        password.
+
+        Returns True or False to indicate successful operation.
+        """
+        sirp_utils = getUtility(ISIRPUtils)
         username = applicant.applicant_id
         fullname = applicant.display_fullname
         subject = 'Your SIRP credentials'
-        msg = 'You have successfully registered for the'
+        msg = 'You have successfully been 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
+            password,login_url,email_to,subject)
+        return success
+
+class ApplicantRegistrationEmailSent(SIRPPage):
+    """Landing page after successful registration.
+    """
+    grok.name('registration_complete')
+    grok.require('waeup.Public')
+    grok.template('applicantregemailsent')
+    title = 'Registration Completed'
+    label = 'Your registration was successful'
+
+    def update(self, email=None):
+        self.email = email
+        return
