Skip to content

Commit

Permalink
added datagovhelp email
Browse files Browse the repository at this point in the history
  • Loading branch information
Jin-Sun-tts committed Nov 20, 2024
1 parent df58b22 commit f0b10a0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .profile
Original file line number Diff line number Diff line change
Expand Up @@ -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[email protected]
export HARVEST_SMTP_RECIPIENT[email protected]


if [[ $REAL_NAME = "datagov-harvest-admin" ]]; then
Expand Down
3 changes: 2 additions & 1 deletion harvester/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
3 changes: 3 additions & 0 deletions harvester/harvest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

1 comment on commit f0b10a0

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests Skipped Failures Errors Time
2 0 💤 0 ❌ 0 🔥 9.105s ⏱️

Please sign in to comment.