Add ability to override SES region

This commit is contained in:
Jasmine Schladen
2020-10-28 17:09:54 -07:00
parent 5e696f36bf
commit 3e492e6310
2 changed files with 13 additions and 1 deletions

View File

@ -61,7 +61,10 @@ def send_via_ses(subject, body, targets):
:param targets:
:return:
"""
client = boto3.client("ses", region_name="us-east-1")
ses_region = current_app.config.get("LEMUR_SES_REGION")
if not ses_region:
ses_region = "us-east-1"
client = boto3.client("ses", region_name=ses_region)
source_arn = current_app.config.get("LEMUR_SES_SOURCE_ARN")
args = {
"Source": current_app.config.get("LEMUR_EMAIL"),