go-gomail / gomail

The best way to send emails in Go.
MIT License
4.33k stars 573 forks source link

Expose Message.parts publicly? #43

Closed Keats closed 8 years ago

Keats commented 8 years ago

It would be useful to have the parts exposed so we can test the body of an email (eg. is the correct activation link present in the email?).

What do you think?

alexcesaro commented 8 years ago

Have you tried using Message.WriteTo?

You could use it with a bytes.Buffer or a custom writer that checks the content of the email.

Keats commented 8 years ago

Missed that, thanks!