Compare commits

...

2 Commits

4 changed files with 7 additions and 6 deletions

View File

@@ -139,7 +139,7 @@ class OtpRequestView(APIView):
return ApiResponse.error(
message=constants.EMAIL_REQUIRED, errors=constants.EMAIL_REQUIRED
)
print(f"email auth username: {settings.EMAIL_HOST_USER}")
print(f"email auth username: {settings.DEFAULT_FROM_EMAIL}")
email = request.data.get("email")
principal = get_principal_by_email(email=email)
@@ -161,7 +161,7 @@ class OtpRequestView(APIView):
email_service = EmailService(
subject="Password Reset Request",
to=principal.email,
from_email=settings.EMAIL_HOST_USER,
from_email=settings.DEFAULT_FROM_EMAIL,
)
# Send the email

View File

@@ -216,6 +216,7 @@ EMAIL_HOST_USER = env.str("EMAIL_HOST_USER")
EMAIL_HOST_PASSWORD = env.str("EMAIL_HOST_PASSWORD")
EMAIL_PORT = env.str("EMAIL_PORT")
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = env.str("DEFAULT_FROM_EMAIL")
ONESIGNAL_APP_ID = env.str("ONESIGNAL_APP_ID")
ONESIGNAL_REST_API_KEY = env.str("ONESIGNAL_REST_API_KEY")

View File

@@ -115,7 +115,7 @@ class ContactUsReplyView(LoginRequiredMixin, generic.View):
email_service = EmailService(
subject=f"Reply of your inquiry - {instance.subject}",
to=instance.email_address,
from_email=settings.EMAIL_HOST_USER,
from_email=settings.DEFAULT_FROM_EMAIL,
)
email_service.set_text_body(message)
email_service.send()
@@ -162,7 +162,7 @@ def ContactUsLandingView(request):
support_team_service = EmailService(
subject=f"New contact us - {subject}",
to=email,
from_email=settings.EMAIL_HOST_USER,
from_email=settings.DEFAULT_FROM_EMAIL,
)
support_team_service.load_template(
@@ -174,7 +174,7 @@ def ContactUsLandingView(request):
thankyou_service = EmailService(
subject=f"New contact us - {subject}",
to=email,
from_email=settings.EMAIL_HOST_USER,
from_email=settings.DEFAULT_FROM_EMAIL,
)
thankyou_service.load_template(

View File

@@ -25,7 +25,7 @@
<p>Hello {{name}},</p>
<p>It looks like you've requested a password reset for your account.</p>
<p>To reset your password, please use the following secret code:</p>
<p><strong>{{ code }}</strong></p>
<h2><strong>{{ code }}</strong></h2>
<p>If you didn't request a password reset, you can safely ignore this email.</p>
<p>Thank you,</p>
<p>Team Digest</p>