更新
This commit is contained in:
+14
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user