// writeEmailHeaders writes the header of the message or file.
writeEmailHeaders writes the header of the message or file.
// writeEmailHeaders writes the header of the message or file .
func writeEmailHeaders(w io.Writer, h textproto.MIMEHeader, writeHeadersSorted bool) (numBytes int) {
	var keys = make([]string, 0, len(h))
	for k := range h {
		keys = append(keys, k)
	}
	if writeHeadersSorted {
		fmt.Println("sorting headers")
		sort.Strings(keys)
	}
	for _, k := range keys {
		numBytes += writeHeader(w, k, h[k]...)
	}
	fmt.Fprintf(w, "\r\n") 
	return
}
func writeEmailHeaders ( w io . Writer , h textproto . MIMEHeader , writeHeadersSorted bool ) ( numBytes int ) { var keys = make ( [ ] string , 0 , len ( h ) ) for k := range h { keys = append ( keys , k ) } if writeHeadersSorted { fmt . Println ( " " ) sort . Strings ( keys ) } for _ , k := range keys { numBytes += writeHeader ( w , k , h [ k ] ... ) } fmt . Fprintf ( w , " \r \n " ) return }
writeEmailHeaders writes the header of the message or file.
writeEmailHeaders writes the header of the message or file .
// add the offset from the header