试试看吗?
recipients := os.Args[3:]addresses := make([]string, len(recipients))for i, recipient := range recipients { addresses[i] = mail.FormatAddress(recipient, "")}mail.SetHeader("To", addresses...)if err := dialer.DialAndSend(mail); err != nil { log.Fatal(err)}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)