This commit is contained in:
aozhiwei 2024-06-24 20:58:04 +08:00
parent ee9b02a362
commit 6f187c3f55
2 changed files with 9 additions and 4 deletions

View File

@ -4,6 +4,7 @@ import (
"q5"
"main/constant"
"fmt"
"strings"
)
type Mail struct {
@ -19,6 +20,14 @@ func (this *Mail) GetContent() string {
return this.content
}
func (this *Mail) ReplaceContent(kv map[string]string) string {
result := this.content
for k, v := range kv {
result = strings.ReplaceAll(result, k, v)
}
return result
}
type MailTable struct {
nameHash *q5.ConcurrentMap[string, *Mail]
}

View File

@ -68,10 +68,6 @@ func (this* hero) internalSendMail(dbIdx int64, accountAddress string, mailName
return true
}
func (this *hero) t(content string) string {
return ""
}
func (this *hero) getMailConfig(mailName string) *jccommon.MailConfig {
if v, ok := this.mailCfgHash.Load(mailName); ok {
return *v