code: func marshalRecipients(r []string) []byte {
  	if len(r) == 0 {
  		return []byte("\n")
  	}
  
  	// deduplicate
  	m := make(map[string]struct{}, len(r))
  	for _, k := range r {
  		m[k] = struct{}{}
  	}
  	// sort
  	keys := make([]string, 0, len(m))
  	for k := range m {
  		keys = append(keys, k)
  	}
  	sort.Strings(keys)
  
  	out := bytes.Buffer{}
  	for _, k := range keys {
  		_, _ = out.WriteString(k)
  		_, _ = out.WriteString("\n")
  	}
  
  	return out.Bytes()
  }
docs: // marshal all in memory Recipients line by line to []byte.