Files
mailx/mailx.go
T

30 lines
506 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 22:29:06 +08:00
var Platform interfaces.EmailFactoryInterface
2023-12-27 18:16:21 +08:00
2024-11-20 19:42:07 +08:00
// 注册
func init() {
2025-08-10 22:24:37 +08:00
Platform = interfaces.NewDefaultEmailFactory()
2023-12-27 18:16:21 +08:00
2024-11-20 19:42:07 +08:00
// 阿里
2025-08-10 22:24:37 +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 22:24:37 +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 22:24:37 +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 22:24:37 +08:00
Platform.Register(mailgun.NewMailGun())
2023-12-27 18:16:21 +08:00
}