diff --git a/dal/views.py b/dal/views.py index 0717334..d1e563a 100644 --- a/dal/views.py +++ b/dal/views.py @@ -600,7 +600,7 @@ class UserCreateAPI(APIView): base_url = "{0}://{1}".format(self.request.scheme, self.request.get_host()) creationtime = int(datetime.utcnow().timestamp()) - link = activate_account_link(base_url, username, pwd, firstname, lastname, email. creationtime) + link = activate_account_link(base_url, username, pwd, firstname, lastname, email, creationtime) # Construct the data for the email email_from = settings.EMAIL_FROM_ADDRESS @@ -624,9 +624,10 @@ class UserCreateAPI(APIView): ) try: mail.send() - except: - return Response('Failed to send the email', 201) - return Response('Email with activation link successfully sent', 200) + except Exception as e: + return response('Failed to send the email, please try again', 400) + return Response('An email with activation link has been sent in order to complete your registration.\n\ + \nPlease check your inbox.', 200) class SeedRetrieveCreate(APIView):