///|
/// SMTP command encoding helpers. Every command is a single line (no CRLF).
pub fn encode_ehlo(host : String) -> String {
  "EHLO \{host}"
}

///|
pub fn encode_helo(host : String) -> String {
  "HELO \{host}"
}

///|
pub fn encode_mail_from(reverse_path : String) -> String {
  "MAIL FROM:\{reverse_path}"
}

///|
pub fn encode_rcpt_to(forward_path : String) -> String {
  "RCPT TO:\{forward_path}"
}

///|
pub fn encode_data() -> String {
  "DATA"
}

///|
pub fn encode_quit() -> String {
  "QUIT"
}

///|
pub fn encode_rset() -> String {
  "RSET"
}

///|
pub fn encode_noop() -> String {
  "NOOP"
}

///|
pub fn encode_auth_plain(credentials_b64 : String) -> String {
  "AUTH PLAIN \{credentials_b64}"
}

///|
pub fn encode_auth_login() -> String {
  "AUTH LOGIN"
}

///|
pub fn encode_auth_cram_md5() -> String {
  "AUTH CRAM-MD5"
}

///|
/// The SMTP data terminator.
pub const DATA_TERMINATOR : String = "."