Files
2025-02-06 11:14:33 +08:00

37 lines
973 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package authservice
import (
"fmt"
"github.com/mailjet/mailjet-apiv3-go"
"log"
"testing"
)
func TestName(t *testing.T) {
mailjetClient := mailjet.NewMailjetClient("00d2889da90d5d90767bf04dc1bdc6fa", "f68cd84cd88b7e2aabce79c878a77e97")
messagesInfo := []mailjet.InfoMessagesV31{
{
From: &mailjet.RecipientV31{
Email: "a745455408@163.com",
Name: "Tokex",
},
To: &mailjet.RecipientsV31{
mailjet.RecipientV31{
Email: "2811588041@qq.com",
Name: "YCZ",
},
},
Subject: "Register/Login",
TextPart: "欢迎注册登录我们的服务您的验证码为123456",
// HTMLPart: "<h3>欢迎注册登录我们的服务您的验证码为1234567</h3><br />May the delivery force be with you!",
// CustomID: "AppGettingStartedTest",
},
}
messages := mailjet.MessagesV31{Info: messagesInfo}
res, err := mailjetClient.SendMailV31(&messages)
if err != nil {
log.Println(err)
}
fmt.Printf("Data: %+v\n", res)
}