Merge pull request #1816 from mattermost/PLT-1607
PLT-1607 adding more debugging info for email and push notifications
Этот коммит содержится в:
@@ -650,6 +650,7 @@ func sendNotificationsAndForget(c *Context, post *model.Post, team *model.Team,
|
||||
httpClient := http.Client{}
|
||||
request, _ := http.NewRequest("POST", *utils.Cfg.EmailSettings.PushNotificationServer+"/api/v1/send_push", strings.NewReader(msg.ToJson()))
|
||||
|
||||
l4g.Debug("Sending push notification to " + msg.DeviceId + " with msg of '" + msg.Message + "'")
|
||||
if _, err := httpClient.Do(request); err != nil {
|
||||
l4g.Error("Failed to send push notificationid=%v, err=%v", id, err)
|
||||
}
|
||||
|
||||
@@ -54,7 +54,11 @@
|
||||
"AmazonS3AccessKeyId": "",
|
||||
"AmazonS3SecretAccessKey": "",
|
||||
"AmazonS3Bucket": "",
|
||||
"AmazonS3Region": ""
|
||||
"AmazonS3Region": "",
|
||||
"AmazonS3Endpoint": "",
|
||||
"AmazonS3BucketEndpoint": "",
|
||||
"AmazonS3LocationConstraint": false,
|
||||
"AmazonS3LowercaseBucket": false
|
||||
},
|
||||
"EmailSettings": {
|
||||
"EnableSignUpWithEmail": true,
|
||||
@@ -100,4 +104,4 @@
|
||||
"TokenEndpoint": "",
|
||||
"UserApiEndpoint": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,11 @@
|
||||
"AmazonS3AccessKeyId": "",
|
||||
"AmazonS3SecretAccessKey": "",
|
||||
"AmazonS3Bucket": "",
|
||||
"AmazonS3Region": ""
|
||||
"AmazonS3Region": "",
|
||||
"AmazonS3Endpoint": "",
|
||||
"AmazonS3BucketEndpoint": "",
|
||||
"AmazonS3LocationConstraint": false,
|
||||
"AmazonS3LowercaseBucket": false
|
||||
},
|
||||
"EmailSettings": {
|
||||
"EnableSignUpWithEmail": true,
|
||||
|
||||
@@ -54,7 +54,11 @@
|
||||
"AmazonS3AccessKeyId": "",
|
||||
"AmazonS3SecretAccessKey": "",
|
||||
"AmazonS3Bucket": "",
|
||||
"AmazonS3Region": ""
|
||||
"AmazonS3Region": "",
|
||||
"AmazonS3Endpoint": "",
|
||||
"AmazonS3BucketEndpoint": "",
|
||||
"AmazonS3LocationConstraint": false,
|
||||
"AmazonS3LowercaseBucket": false
|
||||
},
|
||||
"EmailSettings": {
|
||||
"EnableSignUpWithEmail": true,
|
||||
|
||||
@@ -98,11 +98,12 @@ func SendMail(to, subject, body string) *model.AppError {
|
||||
}
|
||||
|
||||
func SendMailUsingConfig(to, subject, body string, config *model.Config) *model.AppError {
|
||||
|
||||
if !config.EmailSettings.SendEmailNotifications || len(config.EmailSettings.SMTPServer) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
l4g.Debug("sending mail to " + to + " with subject of '" + subject + "'")
|
||||
|
||||
fromMail := mail.Address{config.EmailSettings.FeedbackName, config.EmailSettings.FeedbackEmail}
|
||||
toMail := mail.Address{"", to}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user