3 ms·
Thanks for the suggestions! 1) I worked to create the package such that other sending services can easily be used to send the email. By calling the .Bytes() fu
by jwcrux 13y ago
Thanks for the suggestions!
1) I worked to create the package such that other sending services can easily be used to send the email. By calling the .Bytes() function, you will get a slice of bytes which is the raw email representation that's meant to be sent across the wire. I only included the Send() function as a helper.
2) I'm actually not sure if there's a way to do this in Go.. I suppose I could have made the NewEmail() function take arguments for required items - and I did think about doing this- but what arguments? In what order? Using previous libraries, I've always had to go look up the docs every time I use them because I forget what order the to and from are supposed to be in.
Currently, only runtime checks are performed to make sure there is at least one from and to addresses given.
Thanks for the suggestions - I really appreciate it!