+2016-08-21 Carl Hetherington <cth@carlh.net>
+
+ * Fix problems when sending emails on some servers.
+
2016-08-20 Carl Hetherington <cth@carlh.net>
* Updated nl_NL translation from Rob van Nieuwkerk.
: _from (from)
, _to (to)
, _subject (subject)
- , _body (body)
+ , _body (fix (body))
, _offset (0)
{
- boost::algorithm::replace_all (_body, "\n", "\r\n");
- boost::algorithm::replace_all (_body, "\0", " ");
+
+}
+
+string
+Emailer::fix (string s) const
+{
+ boost::algorithm::replace_all (s, "\n", "\r\n");
+ boost::algorithm::replace_all (s, "\0", " ");
+ return s;
}
void
char* out;
long int bytes = BIO_get_mem_data (bio, &out);
- _email += string (out, bytes);
+ _email += fix (string (out, bytes));
BIO_free_all (b64);
}