to stop "line too long" errors with some email servers.
+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.
2016-08-20 Carl Hetherington <cth@carlh.net>
* Updated nl_NL translation from Rob van Nieuwkerk.
: _from (from)
, _to (to)
, _subject (subject)
: _from (from)
, _to (to)
, _subject (subject)
- 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;
char* out;
long int bytes = BIO_get_mem_data (bio, &out);
char* out;
long int bytes = BIO_get_mem_data (bio, &out);
- _email += string (out, bytes);
+ _email += fix (string (out, bytes));
+ std::string fix (std::string s) const;
+
std::string _from;
std::list<std::string> _to;
std::string _subject;
std::string _from;
std::list<std::string> _to;
std::string _subject;