func NewMultipart(from, to, subject, bodyText, bodyHTML []byte) (
	msg *Message, err error,
) {
	msg = &Message{
		Header: &Header{},
		Body:   &Body{},
	}
	err = msg.Header.Set(FieldTypeFrom, from)
	if err != nil {
		return nil, fmt.Errorf("email.NewMultipart: %w", err)
	}
	err = msg.Header.Set(FieldTypeTo, to)
	if err != nil {
		return nil, fmt.Errorf("email.NewMultipart: %w", err)
	}
	err = msg.Header.Set(FieldTypeSubject, subject)
	if err != nil {
		return nil, fmt.Errorf("email.NewMultipart: %w", err)
	}
	err = msg.Header.SetMultipart()
	if err != nil {
		return nil, fmt.Errorf("email.NewMultipart: %w", err)
	}
	if len(bodyText) > 0 {
		mimeText, err := newMIME([]byte(contentTypeTextPlain), bodyText)
		if err != nil {
			return nil, fmt.Errorf("email.NewMultipart: %w", err)
		}
		msg.Body.Add(mimeText)
	}
	if len(bodyHTML) > 0 {
		mimeHTML, err := newMIME([]byte(contentTypeTextHTML), bodyHTML)
		if err != nil {
			return nil, fmt.Errorf("email.NewMultipart: %w", err)
		}
		msg.Body.Add(mimeHTML)
	}
	return msg, nil
}
NewMultipart create multipart email message with text and HTML bodies.
package email
import (
	"bytes"
	"crypto/rsa"
	"fmt"
	"io/ioutil"
	"strings"
	libbytes "github.com/shuLhan/share/lib/bytes"
	"github.com/shuLhan/share/lib/email/dkim"
)
type Message struct {
	Header        *Header
	Body          *Body
	DKIMSignature *dkim.Signature
	dkimStatus    *dkim.Status
}