Skip to content

Commit

Permalink
Merge pull request #768 from GSA/notify-admin-1158
Browse files Browse the repository at this point in the history
notify-admin-1158 fix email sending
  • Loading branch information
ccostino authored Jan 26, 2024
2 parents 5ebfe95 + a790c2f commit 379a9d3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/notifications/process_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
)
from notifications_utils.template import PlainTextEmailTemplate, SMSMessageTemplate

from app import redis_store
from app.celery import provider_tasks
from app.config import QueueNames
from app.dao.notifications_dao import (
Expand Down Expand Up @@ -123,7 +124,11 @@ def persist_notification(
notification.rate_multiplier = recipient_info.billable_units
elif notification_type == EMAIL_TYPE:
current_app.logger.info(f"Persisting notification with type: {EMAIL_TYPE}")
notification.normalised_to = format_email_address(notification.to)
redis_store.set(
f"email-address-{notification.id}",
format_email_address(notification.to),
ex=1800,
)

# if simulated create a Notification model to return but do not persist the Notification to the dB
if not simulated:
Expand Down

0 comments on commit 379a9d3

Please sign in to comment.