From d888b260ee4008c99cd0edefce75414761a70da3 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 27 Sep 2017 02:45:24 +0530 Subject: [PATCH] welcome user mail --- hosting/views.py | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/hosting/views.py b/hosting/views.py index 1f4bc895..51a90e1d 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -274,22 +274,21 @@ class SignupValidatedView(SignupValidateView): "Your account has been activated."), login_string=_("You can now"), lurl=login_url) - if not pre_valid: - email_data = { - 'subject': 'Welcome to Data Center Light!', - 'to': self.request.user.email, - 'context': { - 'base_url': "{0}://{1}".format( - self.request.scheme, - self.request.get_host() - ) - }, - 'template_name': 'welcome_user', - 'template_path': 'datacenterlight/emails/', - 'from_address': settings.DCL_SUPPORT_FROM_ADDRESS, - } - email = BaseEmail(**email_data) - email.send() + email_data = { + 'subject': _('Welcome to Data Center Light!'), + 'to': self.request.user.email, + 'context': { + 'base_url': "{0}://{1}".format( + self.request.scheme, + self.request.get_host() + ) + }, + 'template_name': 'welcome_user', + 'template_path': 'datacenterlight/emails/', + 'from_address': settings.DCL_SUPPORT_FROM_ADDRESS, + } + email = BaseEmail(**email_data) + email.send() else: home_url = '