Motivation: When writing a SMTP client a provided SMTP codec that follows RFC2821 is useful. Modification: Add client side codec and test. Results: People who want to write a SMTP client can reuse the codec.