调整SetOptions的方式

This commit is contained in:
Yun
2025-11-21 15:54:49 +08:00
parent 04bdd98d6f
commit eeaa518fc3
17 changed files with 90 additions and 86 deletions
+4 -4
View File
@@ -18,7 +18,7 @@ func main() {
panic(err)
}
// 使用em进行后续操作
em,err = em.SetOption(ctx, interfaces.SetSmtp(&interfaces.EmailConfigDataSmtp{
err = em.SetOption(ctx, interfaces.SetSmtp(&interfaces.EmailConfigDataSmtp{
Username: "support@email.blueoceanpay.com",
Password: "SupporT2017",
ReplyTo: "",
@@ -30,10 +30,10 @@ func main() {
}
err = em.Send(ctx, interfaces.Message{
Form: "yun@blueoceanpay.com",
To: []string{"995116474@qq.com"},
Form: "yun@blueoceanpay.com",
To: []string{"995116474@qq.com"},
Subject: "Test Email",
Body: "Hello, this is a test email.",
Body: "Hello, this is a test email.",
})
if err != nil {
panic(err)