grafana/pkg/services/notifications
owensmallwood d5b9602a79
Config: Can add static headers to email messages (#79365)
* Can add allowed custom headers to an email Message. WIP.

* adds slug as a custom email header to all outgoing emails

* Headers are static - declared as key/value pairs in config. All static headers get added to emails.

* updates comment

* adds tests for parsing smtp static headers

* updates test to assert static headers are included when building email

* updates test to use multiple static headers

* updates test names

* fixes linting issue with error

* ignore gocyclo for loading config

* updates email headers in tests to be formatted properly

* add static headers first

* updates tests to assert that regular headers like From cant be overwritten

* ensures only the header is in a valid format for smtp and not the value

* updates comment and error message wording

* adds to docs and ini sample files

* updates smtp.static_headers docs examples formatting

* removes lines commented with semi colons

* prettier:write

* renames var
2023-12-14 12:59:43 -06:00
..
codes_test.go Chore: Fix goimports grouping in pkg/services (#62420) 2023-01-30 08:21:27 +00:00
codes.go User management: Use HMAC-SHA256 to generate time limit codes (password reset tokens) (#42334) 2022-08-18 16:01:09 +02:00
email.go Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
mailer.go Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
mock.go chore: move notifications models into notifications service (#61638) 2023-01-17 14:47:31 -05:00
models.go Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
notifications_test.go Chore: Remove result field from notifications (#65170) 2023-03-28 13:44:15 +02:00
notifications.go Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
send_email_integration_test.go Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
smtp_test.go Config: Can add static headers to email messages (#79365) 2023-12-14 12:59:43 -06:00
smtp.go Config: Can add static headers to email messages (#79365) 2023-12-14 12:59:43 -06:00
testing.go Alerting: Fix Teams notifier not failing on 200 response with error (#52254) 2022-07-14 13:15:18 -04:00
webhook.go Handle ioutil deprecations (#53526) 2022-08-10 15:37:51 +02:00