SMTP: fix truncated attachment if it contains a line with a single dot
Summary:
In SMTP speak, a line with a single dot means end of message. So if
we're attaching a text file that contains such a line, we need to
"escape" it by making it two dots, as the spec says.
No unescaping code needed, the SMTP server takes care of it.
Test Plan:
Sending a text file that starts with ".\n" used to send
an empty file, now it works, I get the full file, intact.
Reviewers: dvratil, mlaurent
Reviewed By: mlaurent
Subscribers: mlaurent, olivierjg, KDE PIM
Tags: KDE PIM
Differential Revision: https://phabricator.kde.org/D9972