-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 接入腾讯云邮件发送 * 接入twilio短信 * 一些修改 * 接入push & 增加http抽象 * 简单接入slog * 修改content定义 & 统一使用slog输出日志 & 修改example * 修改ci-go版本为1.21.3
- Loading branch information
Showing
24 changed files
with
717 additions
and
413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package email | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func TestSend(t *testing.T) { | ||
//e := NewEmailChannel(Config{ | ||
// SenderAddress: "Hooko <[email protected]>", | ||
// SmtpHostAddr: "gz-smtp.qcloudmail.com:465", | ||
// SmtpUserName: "[email protected]", | ||
// SmtpPwd: "xxx", | ||
//}) | ||
// | ||
//deli := notifier.Delivery{ | ||
// Receivers: []notifier.Receiver{ | ||
// {Email: "[email protected]"}, | ||
// }, | ||
// Content: notifier.Content{ | ||
// Title: "发送主题-测试", | ||
// Data: []byte("<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n<title>hello world</title>\n</head>\n<body>\n " + | ||
// "<h1>我的第一个标题</h1>\n <p>我的第一个段落。</p>\n</body>\n</html>"), | ||
// }, | ||
//} | ||
//ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) | ||
//defer cancel() | ||
//err := e.Execute(ctx, deli) | ||
//t.Log(err) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.