调整接口
This commit is contained in:
+8
-12
@@ -6,7 +6,6 @@ import (
|
||||
|
||||
"code.yun.ink/pkg/mailx/aws"
|
||||
"code.yun.ink/pkg/mailx/interfaces"
|
||||
"github.com/yuninks/loggerx"
|
||||
)
|
||||
|
||||
// https://ap-northeast-1.console.aws.amazon.com/ses/home?region=ap-northeast-1#/identities
|
||||
@@ -22,19 +21,16 @@ func TestSend(t *testing.T) {
|
||||
// #发件人
|
||||
// Source: "chenlihan@dreaminglife.cn"
|
||||
|
||||
a := aws.NewAws()
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
logger := loggerx.NewLogger(ctx)
|
||||
|
||||
mail := aws.Aws{}
|
||||
ini, err := mail.InitEmail(ctx, interfaces.EmailConfigData{
|
||||
Aws: &interfaces.EmailConfigDataAws{
|
||||
AccessId: "AKIAU6GD3MNRHKR4RZG5",
|
||||
AccessSecret: "GSdGuFbZlcpVHMODlqeIKr07R/BdTBGeurq0s+4l",
|
||||
Region: "ap-northeast-1",
|
||||
Sender: "chenlihan@dreaminglife.cn",
|
||||
},
|
||||
}, logger)
|
||||
ini, err := a.SetOption(ctx, interfaces.SetAws(&interfaces.EmailConfigDataAws{
|
||||
AccessId: "AKIAU6GD3MNRHKR4RZG5",
|
||||
AccessSecret: "GSdGuFbZlcpVHMODlqeIKr07R/BdTBGeurq0s+4l",
|
||||
Region: "ap-northeast-1",
|
||||
Sender: "chenlihan@dreaminglife.cn",
|
||||
}))
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user