fix: send mail not work(wrong notifyType and subject) (#660)
This commit is contained in:
parent
a5197b4ced
commit
41efc66d25
src/modules/server/notify
|
@ -420,8 +420,8 @@ func send(tos []string, content, subject, notifyType string) error {
|
||||||
return fmt.Errorf("content is blank")
|
return fmt.Errorf("content is blank")
|
||||||
}
|
}
|
||||||
|
|
||||||
if notifyType == "email" {
|
if notifyType == "mail" {
|
||||||
message.Subject = strings.TrimSpace(message.Subject)
|
message.Subject = strings.TrimSpace(subject)
|
||||||
if message.Subject == "" {
|
if message.Subject == "" {
|
||||||
return fmt.Errorf("subject is blank")
|
return fmt.Errorf("subject is blank")
|
||||||
}
|
}
|
||||||
|
@ -432,7 +432,7 @@ func send(tos []string, content, subject, notifyType string) error {
|
||||||
redisc.Write(&message, cron.VOICE_QUEUE_NAME)
|
redisc.Write(&message, cron.VOICE_QUEUE_NAME)
|
||||||
case "sms":
|
case "sms":
|
||||||
redisc.Write(&message, cron.SMS_QUEUE_NAME)
|
redisc.Write(&message, cron.SMS_QUEUE_NAME)
|
||||||
case "email":
|
case "mail":
|
||||||
redisc.Write(&message, cron.MAIL_QUEUE_NAME)
|
redisc.Write(&message, cron.MAIL_QUEUE_NAME)
|
||||||
case "im":
|
case "im":
|
||||||
redisc.Write(&message, cron.IM_QUEUE_NAME)
|
redisc.Write(&message, cron.IM_QUEUE_NAME)
|
||||||
|
|
Loading…
Reference in New Issue