Files
mailx/mailx.go
T

30 lines
505 B
Go
Raw Normal View History

2023-12-27 18:16:21 +08:00
package mailx
import (
2024-11-20 19:42:07 +08:00
"code.yun.ink/pkg/mailx/aliyun"
"code.yun.ink/pkg/mailx/aws"
"code.yun.ink/pkg/mailx/interfaces"
"code.yun.ink/pkg/mailx/mailgun"
"code.yun.ink/pkg/mailx/smtp"
2023-12-27 18:16:21 +08:00
)
2025-08-10 21:17:10 +08:00
var platform *interfaces.DefaultEmailFactory
2023-12-27 18:16:21 +08:00
2024-11-20 19:42:07 +08:00
// 注册
func init() {
2025-08-10 21:17:10 +08:00
platform = interfaces.NewDefaultEmailFactory()
2023-12-27 18:16:21 +08:00
2024-11-20 19:42:07 +08:00
// 阿里
2025-08-10 21:17:10 +08:00
platform.Register(aliyun.NewAliyun())
2023-12-27 18:16:21 +08:00
2024-11-20 19:42:07 +08:00
// AWS
2025-08-10 21:17:10 +08:00
platform.Register(aws.NewAws())
2023-12-27 18:16:21 +08:00
2024-11-20 19:42:07 +08:00
// Smtp
2025-08-10 21:17:10 +08:00
platform.Register(smtp.NewSmtp())
2023-12-27 18:16:21 +08:00
2024-11-20 19:42:07 +08:00
// mailgun
2025-08-10 21:17:10 +08:00
platform.Register(mailgun.NewMailGun())
2023-12-27 18:16:21 +08:00
}