You can avoid this mess altogether by using the quoted-printable content encoding when generating emails.
Maybe you're thinking of base64 encoding?
But this is SMTP, I have no doubt there are gateways out there that will reencode the mail and put the dot back in the wrong place, eg in the name of wrapping all URLs behind a phishing-warning-page