handle conversion of email to buffer in the client

Lets the client handle the low level details like email encoding.