mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
Change DVLA_EMAIL_ADDRESS to a list
This commit is contained in:
@@ -207,7 +207,7 @@ def send_letters_volume_email_to_dvla(letters_volumes, date):
|
||||
personalisation["international_sheets"] += item.sheets_count
|
||||
|
||||
template = dao_get_template_by_id(current_app.config['LETTERS_VOLUME_EMAIL_TEMPLATE_ID'])
|
||||
recipient = current_app.config['DVLA_EMAIL_ADDRESS']
|
||||
recipients = current_app.config['DVLA_EMAIL_ADDRESSES']
|
||||
reply_to = template.service.get_default_reply_to_email_address()
|
||||
service = Service.query.get(current_app.config['NOTIFY_SERVICE_ID'])
|
||||
|
||||
@@ -216,20 +216,20 @@ def send_letters_volume_email_to_dvla(letters_volumes, date):
|
||||
persist_notification,
|
||||
send_notification_to_queue
|
||||
)
|
||||
for recipient in recipients:
|
||||
saved_notification = persist_notification(
|
||||
template_id=template.id,
|
||||
template_version=template.version,
|
||||
recipient=recipient,
|
||||
service=service,
|
||||
personalisation=personalisation,
|
||||
notification_type=template.template_type,
|
||||
api_key_id=None,
|
||||
key_type=KEY_TYPE_NORMAL,
|
||||
reply_to_text=reply_to
|
||||
)
|
||||
|
||||
saved_notification = persist_notification(
|
||||
template_id=template.id,
|
||||
template_version=template.version,
|
||||
recipient=recipient,
|
||||
service=service,
|
||||
personalisation=personalisation,
|
||||
notification_type=template.template_type,
|
||||
api_key_id=None,
|
||||
key_type=KEY_TYPE_NORMAL,
|
||||
reply_to_text=reply_to
|
||||
)
|
||||
|
||||
send_notification_to_queue(saved_notification, False, queue=QueueNames.NOTIFY)
|
||||
send_notification_to_queue(saved_notification, False, queue=QueueNames.NOTIFY)
|
||||
|
||||
|
||||
def get_key_and_size_of_letters_to_be_sent_to_print(print_run_deadline, postage):
|
||||
|
||||
@@ -181,7 +181,7 @@ class Config(object):
|
||||
NOTIFY_INTERNATIONAL_SMS_SENDER = '07984404008'
|
||||
LETTERS_VOLUME_EMAIL_TEMPLATE_ID = '11fad854-fd38-4a7c-bd17-805fb13dfc12'
|
||||
# we only need real email in Live environment (production)
|
||||
DVLA_EMAIL_ADDRESS = 'success@simulator.amazonses.com'
|
||||
DVLA_EMAIL_ADDRESSES = ['success@simulator.amazonses.com']
|
||||
|
||||
BROKER_URL = 'sqs://'
|
||||
BROKER_TRANSPORT_OPTIONS = {
|
||||
@@ -482,6 +482,8 @@ class Test(Development):
|
||||
|
||||
CBC_PROXY_ENABLED = True
|
||||
|
||||
DVLA_EMAIL_ADDRESSES = ['success@simulator.amazonses.com', 'success+2@simulator.amazonses.com']
|
||||
|
||||
|
||||
class Preview(Config):
|
||||
NOTIFY_EMAIL_DOMAIN = 'notify.works'
|
||||
@@ -515,7 +517,7 @@ class Staging(Config):
|
||||
FROM_NUMBER = 'stage'
|
||||
API_RATE_LIMIT_ENABLED = True
|
||||
CHECK_PROXY_HEADER = True
|
||||
DVLA_EMAIL_ADDRESS = os.getenv('DVLA_EMAIL_ADDRESS')
|
||||
DVLA_EMAIL_ADDRESSES = os.getenv('DVLA_EMAIL_ADDRESSES')
|
||||
|
||||
|
||||
class Live(Config):
|
||||
@@ -539,7 +541,7 @@ class Live(Config):
|
||||
CRONITOR_ENABLED = True
|
||||
|
||||
ENABLED_CBCS = {BroadcastProvider.THREE, BroadcastProvider.O2, BroadcastProvider.VODAFONE}
|
||||
DVLA_EMAIL_ADDRESS = os.getenv('DVLA_EMAIL_ADDRESS')
|
||||
DVLA_EMAIL_ADDRESSES = os.getenv('DVLA_EMAIL_ADDRESSES')
|
||||
|
||||
|
||||
class CloudFoundryConfig(Config):
|
||||
|
||||
Reference in New Issue
Block a user