*/
#include "compose.hpp"
-#include "data.h"
#include "config.h"
#include "emailer.h"
#include "exceptions.h"
using std::cout;
using std::pair;
using boost::shared_ptr;
+using dcp::Data;
Emailer::Emailer (string from, list<string> to, string subject, string body)
: _from (from)
, _offset (0)
{
boost::algorithm::replace_all (_body, "\n", "\r\n");
+ boost::algorithm::replace_all (_body, "\0", " ");
}
void
<< "From: " << _from << "\r\n";
if (!_cc.empty ()) {
- email << "Cc: " << address_list (_cc);
+ email << "Cc: " << address_list (_cc) << "\r\n";
}
if (!_bcc.empty ()) {
- email << "Bcc: " << address_list (_bcc);
+ email << "Bcc: " << address_list (_bcc) << "\r\n";
}
string const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";