调整SetOptions的方式
This commit is contained in:
@@ -15,7 +15,7 @@ func ExampleUsage() {
|
||||
smtpClient := NewSmtp()
|
||||
|
||||
// 配置SMTP设置
|
||||
_, err := smtpClient.SetOption(ctx, func(opt *interfaces.Options) {
|
||||
err := smtpClient.SetOption(ctx, func(opt *interfaces.Options) {
|
||||
opt.Smtp = &interfaces.EmailConfigDataSmtp{
|
||||
Host: "smtp.gmail.com",
|
||||
Port: "587", // STARTTLS
|
||||
@@ -56,7 +56,7 @@ func ExampleSSLUsage() {
|
||||
|
||||
smtpClient := NewSmtp()
|
||||
|
||||
_, err := smtpClient.SetOption(ctx, func(opt *interfaces.Options) {
|
||||
err := smtpClient.SetOption(ctx, func(opt *interfaces.Options) {
|
||||
opt.Smtp = &interfaces.EmailConfigDataSmtp{
|
||||
Host: "smtp.gmail.com",
|
||||
Port: "465", // SSL
|
||||
@@ -87,7 +87,7 @@ func ExampleEnterpriseEmail() {
|
||||
smtpClient := NewSmtp()
|
||||
|
||||
// 企业邮箱通常使用587端口和STARTTLS
|
||||
_, err := smtpClient.SetOption(ctx, func(opt *interfaces.Options) {
|
||||
err := smtpClient.SetOption(ctx, func(opt *interfaces.Options) {
|
||||
opt.Smtp = &interfaces.EmailConfigDataSmtp{
|
||||
Host: "smtp.exmail.qq.com", // 腾讯企业邮箱
|
||||
Port: "587",
|
||||
|
||||
Reference in New Issue
Block a user