Files
backend/internal/pkg/email/config.go
lafay 2f584c1f2c
All checks were successful
Build Backend / build (push) Successful in 5m10s
Build Backend / build-docker (push) Successful in 2m22s
This is a breaking change that renames the entire project from "Carrot BBS" to "WithYou".
The Go module name has been changed from `carrot_bbs` to `with_you`, which requires
all import paths to be updated throughout the codebase and by external consumers.

BREAKING CHANGE: Module name changed from carrot_bbs to with_you. All imports
and dependencies must be updated from carrot_bbs/* to with_you/*.
2026-04-22 16:01:59 +08:00

34 lines
876 B
Go

package email
import "with_you/internal/config"
// Config SMTP 邮件配置(由应用配置转换)
type Config struct {
Enabled bool
Host string
Port int
Username string
Password string
FromAddress string
FromName string
UseTLS bool
InsecureSkipVerify bool
TimeoutSeconds int
}
// ConfigFromAppConfig 从应用配置转换
func ConfigFromAppConfig(cfg *config.EmailConfig) Config {
return Config{
Enabled: cfg.Enabled,
Host: cfg.Host,
Port: cfg.Port,
Username: cfg.Username,
Password: cfg.Password,
FromAddress: cfg.FromAddress,
FromName: cfg.FromName,
UseTLS: cfg.UseTLS,
InsecureSkipVerify: cfg.InsecureSkipVerify,
TimeoutSeconds: cfg.Timeout,
}
}