Skip to content

Commit

Permalink
cherrypick from release2.5 (#248)
Browse files Browse the repository at this point in the history
* fix bug

Signed-off-by: Gentleelephant <[email protected]>

* fix bug

Signed-off-by: Gentleelephant <[email protected]>

---------

Signed-off-by: Gentleelephant <[email protected]>
Co-authored-by: Gentleelephant <[email protected]>
  • Loading branch information
Gentleelephant and Gentleelephant authored Mar 5, 2024
1 parent 3fe0120 commit 73737f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions helm/templates/zh-cn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ data:
rule_group: "规则组"
rule_level: "规则级别"
name: "名称"
receiver: "接收者"
workload_type: "工作负载类型"
rule_type: "规则类型"
kind: ConfigMap
metadata:
name: zh-cn
Expand Down
3 changes: 3 additions & 0 deletions pkg/notify/notifier/email/email.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ func (n *Notifier) send(ctx context.Context, to, subject, body string) error {
if err != nil {
return err
}
if conn == nil {
return utils.Errorf("failed to connect to %s", addr)
}

c, err := smtp.NewClient(conn, n.receiver.SmartHost.Host)
if err != nil {
Expand Down

0 comments on commit 73737f9

Please sign in to comment.