GitHub user dosubot[bot] added a comment to the discussion: How to add the date 
to the email subject line

<!-- Greeting -->
Hi @moshhi! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the 
superset team.

<!-- Answer -->
Superset doesn't support Jinja2 templating in email subjects, but you can add 
the date using strftime-style codes if you enable the 
DATE_FORMAT_IN_EMAIL_SUBJECT feature flag. To do this, set 
DATE_FORMAT_IN_EMAIL_SUBJECT = True in your Superset config. Then, in your 
alert or report subject, use something like Report for %Y-%m-%d and Superset 
will automatically replace it with the current UTC date when sending the email. 
You can find the full list of date codes at strftime.org. This feature is off 
by default and must be explicitly enabled in your configuration 
([docs](https://github.com/apache/superset/blob/7b6885a020af6c55fd6661ca766ebc18399c9496/docs/docs/configuration/alerts-reports.mdx)
 | 
[code](https://github.com/apache/superset/blob/7b6885a020af6c55fd6661ca766ebc18399c9496/superset/reports/notifications/email.py)).


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/648f9928-5cc7-4135-b9eb-00103c43a2fb?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/648f9928-5cc7-4135-b9eb-00103c43a2fb?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/648f9928-5cc7-4135-b9eb-00103c43a2fb?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/648f9928-5cc7-4135-b9eb-00103c43a2fb?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/648f9928-5cc7-4135-b9eb-00103c43a2fb?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/648f9928-5cc7-4135-b9eb-00103c43a2fb?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/648f9928-5cc7-4135-b9eb-00103c43a2fb?feedback_type=other)</sup>&nbsp;&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/33777)

GitHub link: 
https://github.com/apache/superset/discussions/33777#discussioncomment-13478090

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: 
notifications-unsubscr...@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to