test which does not include any repoze.sendmail code, but emulates what encode_message tries to do