mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-18 00:16:37 +08:00
18 lines
370 B
Go
18 lines
370 B
Go
package service
|
|
|
|
import (
|
|
"fmt"
|
|
"one-api/common"
|
|
"one-api/model"
|
|
)
|
|
|
|
func notifyRootUser(subject string, content string) {
|
|
if common.RootUserEmail == "" {
|
|
common.RootUserEmail = model.GetRootUserEmail()
|
|
}
|
|
err := common.SendEmail(subject, common.RootUserEmail, content)
|
|
if err != nil {
|
|
common.SysError(fmt.Sprintf("failed to send email: %s", err.Error()))
|
|
}
|
|
}
|