Skip to content

Commit a5c7f7d

Browse files
feat: added new patch to add email settings
feat: updated docs for changes
1 parent 2b03ccc commit a5c7f7d

File tree

5 files changed

+20
-3
lines changed

5 files changed

+20
-3
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ cython_debug/
173173
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174174
# and can be added to the global gitignore or merged into this file. For a more nuclear
175175
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
176-
#.idea/
176+
.idea/
177177

178178
# Abstra
179179
# Abstra is an AI-powered process automation framework.
@@ -182,9 +182,9 @@ cython_debug/
182182
.abstra/
183183

184184
# Visual Studio Code
185-
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
185+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186186
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187-
# and can be added to the global gitignore or merged into this file. However, if you prefer,
187+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
188188
# you could uncomment the following to ignore the entire vscode folder
189189
# .vscode/
190190

README.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,20 @@ Usage
1717
.. code-block:: bash
1818
1919
tutor plugins enable notifications
20+
Configuration
21+
*************
22+
23+
The plugin exposes the following Tutor configuration keys :
24+
- ``NOTIFICATIONS_DEFAULT_FROM_EMAIL``
25+
- Default: inherits from the platform `CONTACT_EMAIL`.
26+
- Purpose: sets the default "from" address used when sending notification emails.
27+
28+
.. code-block:: yaml
29+
30+
NOTIFICATIONS_DEFAULT_FROM_EMAIL: "[email protected]"
31+
32+
After changing configuration,restart environment so the new environment variable and settings are picked up by the LMS and MFE images.
33+
If you rely on a specific "from" email for outgoing notifications, explicitly set ``NOTIFICATIONS_DEFAULT_FROM_EMAIL`` rather than relying on the platform-wide ``CONTACT_EMAIL``.
2034

2135

2236
The email and push notification settings under Account can be enabled/disabled using `NOTIFICATIONS_ENABLE_SHOW_EMAIL_CHANNEL`

tutornotifications/patches/lms-env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
NOTIFICATIONS_DEFAULT_FROM_EMAIL: '{{ NOTIFICATIONS_DEFAULT_FROM_EMAIL }}'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
NOTIFICATIONS_DEFAULT_FROM_EMAIL = ENV_TOKENS.get("NOTIFICATIONS_DEFAULT_FROM_EMAIL", ENV_TOKENS["CONTACT_EMAIL"])

tutornotifications/plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
("NOTIFICATIONS_VERSION", __version__),
2020
("NOTIFICATIONS_ENABLE_SHOW_EMAIL_CHANNEL", True),
2121
("NOTIFICATIONS_ENABLE_SHOW_PUSH_CHANNEL", False),
22+
("NOTIFICATIONS_DEFAULT_FROM_EMAIL", "{{ CONTACT_EMAIL }}")
2223
]
2324
)
2425

0 commit comments

Comments
 (0)