code: func (m *MailYak) writeHeaders(buf io.Writer) error {
  
  	if _, err := buf.Write([]byte(m.fromHeader())); err != nil {
  		return err
  	}
  
  	if _, err := buf.Write([]byte("Mime-Version: 1.0\r\n")); err != nil {
  		return err
  	}
  
  	fmt.Fprintf(buf, "Date: %s\r\n", m.date)
  
  	if m.replyTo != "" {
  		fmt.Fprintf(buf, "Reply-To: %s\r\n", m.replyTo)
  	}
  
  	fmt.Fprintf(buf, "Subject: %s\r\n", m.subject)
  
  	for _, to := range m.toAddrs {
  		fmt.Fprintf(buf, "To: %s\r\n", to)
  	}
  
  	for _, cc := range m.ccAddrs {
  		fmt.Fprintf(buf, "CC: %s\r\n", cc)
  	}
  
  	if m.writeBccHeader {
  		for _, bcc := range m.bccAddrs {
  			fmt.Fprintf(buf, "BCC: %s\r\n", bcc)
  		}
  	}
  
  	for k, v := range m.headers {
  		fmt.Fprintf(buf, "%s: %s\r\n", k, v)
  	}
  
  	return nil
  }
docs: // writeHeaders writes the Mime-Version, Date, Reply-To, From, To and Subject headers,
  // plus any custom headers set via AddHeader().