diff --git a/.profile b/.profile index 24e9a97..3a1b62c 100644 --- a/.profile +++ b/.profile @@ -41,7 +41,7 @@ export HARVEST_SMTP_STARTTLS=True export HARVEST_SMTP_USER=$(vcap_get_service smtp .credentials.smtp_user) export HARVEST_SMTP_PASSWORD=$(vcap_get_service smtp .credentials.smtp_password) export HARVEST_SMTP_MAIL_FROM=harvester@$(vcap_get_service smtp .credentials.domain_arn | grep -o "ses-[[:alnum:]]\+.ssb.data.gov") -# export HARVEST_SMTP_REPLY_TO=datagovhelp@gsa.gov +export HARVEST_SMTP_RECIPIENT=datagovhelp@gsa.gov if [[ $REAL_NAME = "datagov-harvest-admin" ]]; then diff --git a/harvester/__init__.py b/harvester/__init__.py index 52539bc..44eacc0 100644 --- a/harvester/__init__.py +++ b/harvester/__init__.py @@ -20,5 +20,6 @@ "username": os.getenv("HARVEST_SMTP_USER"), "password": os.getenv("HARVEST_SMTP_PASSWORD"), "default_sender": os.getenv("HARVEST_SMTP_MAIL_FROM"), - "base_url": os.getenv("REDIRECT_URI").rsplit("/", 1)[0] + "base_url": os.getenv("REDIRECT_URI").rsplit("/", 1)[0], + "recipient": os.getenv("HARVEST_SMTP_RECIPIENT") } diff --git a/harvester/harvest.py b/harvester/harvest.py index aab7657..9fb36ea 100644 --- a/harvester/harvest.py +++ b/harvester/harvest.py @@ -388,6 +388,9 @@ def send_notification_emails(self, results: dict) -> None: """ recipient_list = self.notification_emails + other_recipient = SMTP_CONFIG.get("recipient") + if other_recipient: + recipient_list.append(other_recipient) recipient_string = ", ".join(recipient_list) msg = MIMEMultipart()