fix registration so email gets sent

This commit is contained in:
Kenneth Kehl
2024-01-11 11:11:12 -08:00
parent a8955ef78f
commit c3cb60f3b0
2 changed files with 21 additions and 11 deletions

View File

@@ -353,7 +353,7 @@ def create_2fa_code(
key = f"2facode-{saved_notification.id}".replace(" ", "")
recipient = str(recipient)
redis_store.raw_set(key, recipient)
redis_store.raw_set(key, recipient, ex=60 * 60)
# Assume that we never want to observe the Notify service's research mode
# setting for this notification - we still need to be able to log into the
@@ -431,6 +431,12 @@ def send_new_user_email_verification(user_id):
key_type=KEY_TYPE_NORMAL,
reply_to_text=service.get_default_reply_to_email_address(),
)
redis_store.set(
f"email-address-{saved_notification.id}",
str(user_to_send_to.email_address),
ex=60 * 60,
)
current_app.logger.info("Sending notification to queue")
send_notification_to_queue(saved_notification, queue=QueueNames.NOTIFY)