Skip to content
Snippets Groups Projects
Verified Commit 38b52edd authored by Erwan Rouchet's avatar Erwan Rouchet
Browse files

Configurable e-mail sender address

parent f2dbdd77
Branches release-1.7.2
Tags 1.7.2
1 merge request!2504Configurable e-mail sender address
...@@ -112,6 +112,7 @@ def get_settings_parser(base_dir): ...@@ -112,6 +112,7 @@ def get_settings_parser(base_dir):
email_parser.add_option("port", type=int) email_parser.add_option("port", type=int)
email_parser.add_option("user", type=str) email_parser.add_option("user", type=str)
email_parser.add_option("password", type=str) email_parser.add_option("password", type=str)
email_parser.add_option("from_address", type=str, default=None)
email_parser.add_option("error_report_recipients", type=str, many=True, default=[]) email_parser.add_option("error_report_recipients", type=str, many=True, default=[])
export_parser = parser.add_subparser("export", default={}) export_parser = parser.add_subparser("export", default={})
......
...@@ -480,7 +480,7 @@ if conf["email"]: ...@@ -480,7 +480,7 @@ if conf["email"]:
EMAIL_HOST = conf["email"]["host"] EMAIL_HOST = conf["email"]["host"]
EMAIL_PORT = conf["email"]["port"] EMAIL_PORT = conf["email"]["port"]
EMAIL_HOST_USER = conf["email"]["user"] EMAIL_HOST_USER = conf["email"]["user"]
DEFAULT_FROM_EMAIL = SERVER_EMAIL = EMAIL_HOST_USER DEFAULT_FROM_EMAIL = SERVER_EMAIL = conf["email"]["from_address"] or EMAIL_HOST_USER
EMAIL_HOST_PASSWORD = conf["email"]["password"] EMAIL_HOST_PASSWORD = conf["email"]["password"]
EMAIL_USE_TLS = True EMAIL_USE_TLS = True
else: else:
......
...@@ -39,6 +39,7 @@ database: ...@@ -39,6 +39,7 @@ database:
email: email:
error_report_recipients: error_report_recipients:
- noreply@nasa.gov - noreply@nasa.gov
from_address: None
host: smtp.wanadoo.fr host: smtp.wanadoo.fr
password: hunter2 password: hunter2
port: 25 port: 25
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment