25
25
26
26
User = get_user_model ()
27
27
28
- ALLOWED_EMAIL_PROVIDERS = ["tutanota.com" , "protonmail.com" , "zoho.com" , "hubspot.com" , "mail.com" , "gmx.com" , "yandex.com" ,
29
- "pm.com" , 'gmail.com' , 'yahoo.com' , 'icloud.com' , "outlook.com" , "hotmail.com" , "aol.com" , "aim.com" , "titan.email" ]
28
+ ALLOWED_EMAIL_PROVIDERS = ['gmail.com' ]
30
29
31
30
32
31
class UserViewSet (viewsets .ModelViewSet ):
@@ -46,7 +45,7 @@ def create(self, request, *args, **kwargs):
46
45
domain = email .split ('@' )[1 ]
47
46
if domain not in ALLOWED_EMAIL_PROVIDERS :
48
47
# Return an error response if email provider is not allowed
49
- return Response ({"message" : "Signups from this email provider are not allowed. " }, status = status .HTTP_400_BAD_REQUEST )
48
+ return Response ({"message" : "Please Use Gmail Account Only " }, status = status .HTTP_400_BAD_REQUEST )
50
49
else :
51
50
# Return an error response if email is not provided
52
51
return Response ({"message" : "Please provide an email address." }, status = status .HTTP_400_BAD_REQUEST )
@@ -136,7 +135,7 @@ def SendVerificationEmail(username, email):
136
135
# Sending the Email
137
136
138
137
context = {"username" : User .objects .get (email = email ).username , "pin" : pin }
139
- email_body = render_to_string ('mail/verifyUser.html ' , context )
138
+ email_body = render_to_string ('mail/verifyUser.Html ' , context )
140
139
141
140
email = EmailMessage (
142
141
'Complete Your Signup On ZoloEarn' ,
@@ -720,4 +719,4 @@ def get(self, request, format=None):
720
719
721
720
referral_data .append ({'referred_user' : referred_user , 'wallet_points' : referred_wallet_points })
722
721
723
- return Response (referral_data )
722
+ return Response (referral_data )
0 commit comments