Sending subject and using default sender
This commit is contained in:
parent
2ff836019f
commit
c730a7b1ec
|
@ -45,6 +45,7 @@ LDAP_URL = environ.get('LDAP_URL', default="ldap.virginia.edu").strip('/') # No
|
|||
LDAP_TIMEOUT_SEC = int(environ.get('LDAP_TIMEOUT_SEC', default=1))
|
||||
|
||||
# Email configuration
|
||||
DEFAULT_SENDER = 'askresearch@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')
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
from jinja2 import Template
|
||||
|
||||
from crc import app
|
||||
from crc.api.common import ApiError
|
||||
from crc.scripts.script import Script
|
||||
from crc.services.ldap_service import LdapService
|
||||
|
@ -29,8 +30,8 @@ Email Subject ApprvlApprvr1 PIComputingID
|
|||
content = self.get_content(task)
|
||||
if recipients:
|
||||
send_mail(
|
||||
subject='Test Subject',
|
||||
sender='sender@sartography.com',
|
||||
subject=subject,
|
||||
sender=app.config['DEFAULT_SENDER'],
|
||||
recipients=recipients,
|
||||
content=content,
|
||||
content_html=content
|
||||
|
|
Loading…
Reference in New Issue