DockYard / elixir-mail

Build composable mail messages
392 stars 64 forks source link

Have body be anything that uses String.Chars #7

Open asonge opened 8 years ago

asonge commented 8 years ago

In order to make things as flexible as possible, have the body of a Mail message be anything that implements String.Chars. This lets each message type know how to encode itself, maximizing future extensibility.

bcardarella commented 7 years ago

I realize this was opened a long time ago, but I'm triaging now. Do you happen to recall your use-case? The message body should always be a binary which does implement String.Chars. Or were you suggesting implementing the prototcol on the message itself?

asonge commented 7 years ago

I think I posited this for implementing MIME and other kinds of message types, but I'm not sure (this was so long ago).

asonge commented 7 years ago

Come to think of it, it might be useful to have another protocol for an email message specifically, but I'm not 100% sure what that looks like.