xhit/go-simple-mail

[Proposal] func (*Email) SetBodyData(contentType contentType, body []byte) *Email

hiendv opened this issue · 0 comments

Hi,
I would like to propose a small feature to the current API by providing

func (*Email) SetBodyData(contentType contentType, body []byte) *Email

to initialize body part buffer with byte slice instead of a string.
It would help reducing the memory allocation when converting a []byte -> string -> []byte buffer.
Thanks again.