This commit is contained in:
Yun
2025-08-30 18:14:09 +08:00
parent 54b1974509
commit 139330aee2
5 changed files with 18 additions and 6 deletions
+14 -2
View File
@@ -18,10 +18,22 @@ func main() {
panic(err)
}
// 使用em进行后续操作
em.SetOption(ctx, interfaces.SetSmtp(&interfaces.EmailConfigDataSmtp{}))
em,err = em.SetOption(ctx, interfaces.SetSmtp(&interfaces.EmailConfigDataSmtp{
Username: "support@email.blueoceanpay.com",
Password: "SupporT2017",
ReplyTo: "",
Host: "smtpdm-ap-southeast-1.aliyun.com",
Port: "80",
}))
if err != nil {
panic(err)
}
err = em.Send(ctx, interfaces.Message{
Form: "",
Form: "yun@blueoceanpay.com",
To: []string{"995116474@qq.com"},
Subject: "Test Email",
Body: "Hello, this is a test email.",
})
if err != nil {
panic(err)