// mail 包示例:SMTP 发送邮件(SendToMail)与收件人列表合并(MergeSlice) package main import ( "fmt" "git.zeroonesoft.cn/golib/zogo/mail" ) func main() { // MergeSlice:合并收件人列表(to + cc + bcc 一次性提交给 SMTP) merged := mail.MergeSlice([]string{"a@test.com", "b@test.com"}, []string{"c@test.com"}) fmt.Println("合并收件人:", merged) // SendToMail 参数说明: // user SMTP 账号 // password SMTP 密码/授权码 // host SMTP 服务器,如 "smtp.example.com:25" // from 发件人地址 // subject 邮件主题 // body 邮件正文 // mailType "html" 为 HTML 邮件,其他值为纯文本 // replyToAddress 回复地址 // to / cc / bcc 收件人 / 抄送 / 密送列表 // // 填入真实 SMTP 账号后调用即可发送: // // err := mail.SendToMail( // "user@example.com", "password", "smtp.example.com:25", // "user@example.com", "测试邮件", "