Commit Graph

61 Commits

Author SHA1 Message Date
Torkel Ödegaard
df71fe33fd refactor: refactoring notification service to use new service registry hooks 2018-04-27 14:15:17 +02:00
Mario Trangoni
c1742df9ac remove unused variables detected by varcheck 2018-04-18 19:04:37 +02:00
Karsten Weiss
4d6386e97b Use fmt.Errorf() (gosimple)
This fixes:
pkg/cmd/grafana-cli/commands/install_command.go:36:11: should use fmt.Errorf(...) instead of errors.New(fmt.Sprintf(...)) (S1028)
pkg/models/org_user.go:53:11: should use fmt.Errorf(...) instead of errors.New(fmt.Sprintf(...)) (S1028)
pkg/services/notifications/mailer.go:138:16: should use fmt.Errorf(...) instead of errors.New(fmt.Sprintf(...)) (S1028)
2018-04-16 21:04:57 +02:00
bergquist
f2755982c3 tech: migrates to none deprecated mail lib
gomail is missing a maintainer so we are
switching to an active fork

ref https://github.com/go-gomail/gomail/issues/108

closes #7189
2018-03-27 21:53:46 +02:00
Carl Bergquist
e9e8ffc769 Merge pull request #9367 from bobrik/dualstack
Enable dualstack in every net.Dialer, fixes #9364
2017-09-28 11:15:49 +02:00
Ivan Babrou
9a4ae30227
Enable dualstack in every net.Dialer, fixes #9364
Default transport enables it:

* https://github.com/golang/go/blob/d2826d3e06/src/net/http/transport.go#L42-L46

```
    DialContext: (&net.Dialer{
	Timeout:   30 * time.Second,
	KeepAlive: 30 * time.Second,
	DualStack: true,
    }).DialContext,
```

See also: https://github.com/golang/go/issues/15324
2017-09-27 22:29:48 -07:00
Tobias Hintze
af79d046db introduce smtp config option for EHLO identity 2017-09-24 20:48:20 +02:00
Daniel Lee
b8aa203707 signup: fix email sent logic for tempuser
Fixes #8656 and properly sets the email_sent and email_sent_on fields
for a tempuser (signup user).
2017-06-30 20:21:08 +02:00
Torkel Ödegaard
87c978ebc9 fix: better error handling / messsage when testing email notification when stmp is not configured, fixes #8093 2017-04-25 13:16:41 +02:00
bergquist
412b8998a8 webhooks: get proxy settings from ini file
closes #7710
2017-03-02 13:57:28 +01:00
bergquist
05952688c5 tech: avoid using http.DefaultClient 2017-02-24 17:22:12 +01:00
bergquist
03354bc49a tech: replace context.TODO with background ctx 2017-02-24 09:20:28 +01:00
Daniel Lee
6dfdcd7ca5 email: change default from name to Grafana
Changes default from name in smtp settings
from Grafana Admin to Grafana.

Fix for integration test (which is skipped but that
did not work)
2017-02-15 11:02:46 +01:00
Jacob Bednarz
796957c8c6
Update mailer tests to include FromName 2017-02-15 08:04:21 +11:00
Jacob Bednarz
66445faeb5
Format mailer From field to include name
Updates the messafe `From` field to include the name and email of the
sender.
2017-02-15 07:51:41 +11:00
Jacob Bednarz
7dc6b69c8b
s/smpt/SMTP 2017-02-15 07:43:59 +11:00
Jacob Bednarz
c9d4654592
s/from_adress/from_address 2017-02-15 07:43:16 +11:00
bergquist
f5d8a75381 tech(webhook): remove redundant if statement 2017-01-19 09:29:40 +01:00
huydx
376d2d56bf (feature) add LINE notify to notifier 2017-01-19 17:26:53 +09:00
bergquist
4ea4e0436a feat(mailer): set localname to hostname
Some email providers does not accept localhost
in the HELO message. So we set it to hostname
instead. Our hope is that should be enough for
those providers who does not accept localhost.

closes #7223
2017-01-17 10:36:04 +01:00
bergquist
c467e48940 feat(notifications): removes html escaping subject
closes #6905
2016-12-15 14:27:33 +01:00
bergquist
f907330c9e tech(mailer): improves error when grafana cannot read open cert/key file
ref #6949
2016-12-15 08:27:21 +01:00
bergquist
b81e97c99c webhook: adds json content-type
closes #6822
2016-12-05 10:46:04 +01:00
bergquist
5bbdd99d35 tech(notifications): remove async webhook 2016-11-08 08:06:42 +01:00
bergquist
d1d7c240f9 tech(mailer): dont use deprecated method 2016-11-02 22:11:59 +01:00
bergquist
5bf5ed68e1 tech(notifications): replace internal email code 2016-10-21 09:06:03 +02:00
bergquist
f77799837e feat(alerting): support for attached graphs in alert notifications
closes #6183
2016-10-21 09:06:03 +02:00
bergquist
d1eceedf55 feat(webhook): add httpmethod to webhook
closes #6255
2016-10-18 16:50:16 +02:00
Carl Bergquist
c38f6ff182 Make alerting notifcations sync (#6158)
* tech(routines): move the async logic from notification to alerting notifier

* tech(notification): reduce code dupe

* fix(notification): dont touch the response unless its an error

* feat(alerting): make alerting exeuction async but flow sync

* tech(alerting): remove commented code

* tech(alerting): remove unused code

* tech(alerting): fix typo

* tech(alerting): implement Context on EvalContext

* tech(alerting): wait for all alerts to return

* feat(alerting): dont allow alert responses to cancel

* Revert "feat(alerting): dont allow alert responses to cancel"

This reverts commit 324b006c96.

* feat(alerting): give alerts some time to finish before closing down
2016-10-03 09:38:03 +02:00
bergquist
a49c21df3a fix(png-renderer): increase timeouts 2016-09-22 19:24:18 +02:00
Torkel Ödegaard
e336fb3d60 fix(smtp mailer): added timeout of 10 seconds to smpt mailer, fixes #2989 2016-09-22 11:51:39 +02:00
bergquist
59cb51dc6f test(emails): update fake data model 2016-09-07 13:47:57 +02:00
bergquist
fb7a6c0764 feat(alerting): list all series in alert email 2016-08-13 12:50:51 +02:00
bergquist
c4e905474a feat(alerting): improve email notifications layout 2016-08-13 11:24:03 +02:00
bergquist
1dcae464fe chore(notifications): remove commented test 2016-08-12 10:17:21 +02:00
bergquist
d6fdb598b0 fix(alerting): gofmt 2016-08-08 14:46:47 +02:00
Torkel Ödegaard
1edd224168 feat(alerting): fixing failing unit tests 2016-08-01 14:34:58 +02:00
Torkel Ödegaard
ae5f8a76d9 feat(alerting): lots of progress on notifications, refactored them out to their own package, restored webhook notitication and added slack notification 2016-07-27 12:09:55 +02:00
bergquist
fa309ec925 feat(alerting): add default notification group 2016-06-20 15:24:48 +02:00
bergquist
4c4164bb40 test(alerting): adds test email creater 2016-06-20 07:49:08 +02:00
bergquist
adea539b8d feat(alerting): add link to panel png 2016-06-17 16:43:14 +02:00
bergquist
212fd27252 feat(alerting): add support for email notifications 2016-06-17 15:30:17 +02:00
bergquist
72e23bca5f tech(alerting): improve/cleanup logging 2016-06-16 08:56:19 +02:00
bergquist
2e809cae05 tech(alerting): enforce POST for webhooks 2016-06-16 08:16:16 +02:00
bergquist
efea3bc9cb feat(alerting): skeleton commit for webhook 2016-06-16 08:16:16 +02:00
Torkel Ödegaard
fa3329271d fix(email notifications): added error handling to email template parsing, fixes #2690 2015-09-08 10:57:47 +02:00
Torkel Ödegaard
aa89416bca fix(invite): fixes to org invite stuff, #2630 2015-09-01 12:35:06 +02:00
Torkel Ödegaard
99bb9d4fcf feat(signup): added back the welcome on signup completed email 2015-08-31 11:42:12 +02:00
Torkel Ödegaard
d19e101e6b feat(signup): almost done with new sign up flow, #2353 2015-08-31 11:35:07 +02:00
Torkel Ödegaard
c61b22cefb feat(signup): progress on new sign up and email verification flow, #2353 2015-08-28 13:45:16 +02:00