-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat: ✨ addes x-priority option to email header and frappe.sendmail #31966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c47c980 to
68d96a7
Compare
|
@jll-02 Since |
…il function creating the option to give the email an importance. 1 = Highest, 3 = Normal, 5 = Lowest commonly used to flag the importance of emails
|
@s-aga-r Good Point. If you have anything else, please let me know |
…il function (#31966) (#32089) creating the option to give the email an importance. 1 = Highest, 3 = Normal, 5 = Lowest commonly used to flag the importance of emails Co-authored-by: Jan Lukas Liesen <=> (cherry picked from commit 89ed7c9) Co-authored-by: jll-02 <63648645+jll-02@users.noreply.github.com>
# [15.64.0](v15.63.1...v15.64.0) (2025-04-15) ### Bug Fixes * check if user is diabled during api authentication ([ba81f14](ba81f14)) * compare lowercase keyword in global search ([#31832](#31832)) ([df0d514](df0d514)) * drop `branch_name` ([7e2c2a3](7e2c2a3)) * Event google URL field not big enough for irl data ([08e7aba](08e7aba)) * **event:** Handle month ends for repeating monthly ([d1e5c09](d1e5c09)) * **google-calendar:** Use byday variable type properly ([3829c2a](3829c2a)) * improve url validation ([#32052](#32052)) ([#32078](#32078)) ([4907ade](4907ade)) * increase failure threshold for preapred report ([#32063](#32063)) ([#32070](#32070)) ([495db3d](495db3d)) * linter config in boilerplate ([fea2139](fea2139)) * list_view_settings can be missing ([#32048](#32048)) ([8c7e860](8c7e860)) * make app installation possible again ([4d774e8](4d774e8)) * only exclude RUF001 where we're using some ambiguous characters ([42379ea](42379ea)) * Prevent duplicate ToDo creation when assigning ([dc3370b](dc3370b)) * print builder beta print option not working ([5977581](5977581)) * **push_notification:** use cstr to convert a None body to empty string ([#32056](#32056)) ([#32062](#32062)) ([9b7b44d](9b7b44d)) * remove print statement ([ebc484f](ebc484f)) * respect include filters while generating report name ([25d87bd](25d87bd)) * Show doctype name in perm check errors ([#32122](#32122)) ([#32125](#32125)) ([75cc5d1](75cc5d1)) * skip adding app to list if we can't run the permission hook ([#32134](#32134)) ([1d03333](1d03333)) * switch to ruff ([d84dda8](d84dda8)) * sync translations from crowdin ([#32012](#32012)) ([257a864](257a864)) * Use GET for get_events for notification bar ([5215f91](5215f91)) * **UX:** block inserting more than 5000 items in table ([#32127](#32127)) ([#32130](#32130)) ([8e74e4e](8e74e4e)) ### Features * ✨ addes x-priority option to email header and the frappe.sendmail function ([#31966](#31966)) ([#32089](#32089)) ([5cc38b6](5cc38b6)) * add info about pre-commit to README ([7d1b92a](7d1b92a)) * ask for branch name ([a70f2e5](a70f2e5)) * copy config files to new app ([745400f](745400f)) * create pre-commit config for new app ([d1254d3](d1254d3)) * linter workflow for new apps ([186e46d](186e46d)) * protect attached files (backport [#31855](#31855)) ([#31970](#31970)) ([15334b6](15334b6)) ### Reverts * Revert "refactor: _create_app_boilerplate" ([a924cce](a924cce))
Description
I want to be able to send email with different priorities / importance shown in the email, e.g. in outlook shown as an exclamation mark or an arrow.
This should be an optional argument since I want to send normal emails most of the time and the existing code still has to work.
This PR introduces this change:
I can set the "X-Priority" when calling the
frappe.sendmailfunction. This argument will be passed to the email header where it will be set to the correct Header Setting to take effect.Additional notes
I firstly created this with an Enum however I wasn't sure where to create the Enum. I would have had to import this very specific Enum in the
frappe/__init__.pyto set the default value. I did not feel comfortable with it. I would be willing to use an enum again if someone could tell me where best to create it and if it would be alright to import it in thefrappe/__init__.py.If there are other questions about my code, feel free to ask
Backport
when merging this a backport to v-15 would be much appreciated.