Merge pull request #387 from sartography/email-from-field-475

Email from field #475
This commit is contained in:
Dan Funk 2021-10-06 13:42:27 -04:00 committed by GitHub
commit 017ab45311
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -78,7 +78,7 @@ GITHUB_REPO = environ.get('GITHUB_REPO', None)
TARGET_BRANCH = environ.get('TARGET_BRANCH', None)
# Email configuration
DEFAULT_SENDER = 'askresearch@virginia.edu'
DEFAULT_SENDER = 'uvacrconnect@virginia.edu'
FALLBACK_EMAILS = ['askresearch@virginia.edu', 'sartographysupport@googlegroups.com']
MAIL_DEBUG = environ.get('MAIL_DEBUG', default=True)
MAIL_SERVER = environ.get('MAIL_SERVER', default='smtp.mailtrap.io')

View File

@ -29,5 +29,8 @@ class TestEmailScript(BaseTest):
self.assertIn(task_data['ApprvlApprvr1'], outbox[0].body)
self.assertIn(task_data['ApprvlApprvr1'], outbox[0].html)
# Correct From field
self.assertEqual('uvacrconnect@virginia.edu', outbox[0].sender)
db_emails = EmailModel.query.count()
self.assertEqual(db_emails, 1)