Tell user we need a KDM when we have none, and content is encrypted.
[dcpomatic.git] / src / lib / send_problem_report_job.cc
index aac2b6e66645cfb8ef5e0520a346adc882b6e7fe..7f60a3fdc2e8e91239a2ff92753a31e621af3ecd 100644 (file)
 #include "emailer.h"
 #include "environment_info.h"
 #include <libxml++/libxml++.h>
-#include <boost/foreach.hpp>
 
 #include "i18n.h"
 
 using std::string;
 using std::list;
-using boost::shared_ptr;
+using std::shared_ptr;
 
 /** @param film Film thta the problem is with, or 0.
  *  @param from Email address to use for From:
@@ -52,6 +51,11 @@ SendProblemReportJob::SendProblemReportJob (
 
 }
 
+SendProblemReportJob::~SendProblemReportJob ()
+{
+       stop_thread ();
+}
+
 string
 SendProblemReportJob::name () const
 {
@@ -76,9 +80,9 @@ SendProblemReportJob::run ()
 
        string body = _summary + "\n\n";
 
-       body += "Version: " + string (dcpomatic_version) + " " + string (dcpomatic_git_commit) + "\n\n";
+       body += "Version: " + string(dcpomatic_version) + " " + string(dcpomatic_git_commit) + "\n\n";
 
-       BOOST_FOREACH (string i, environment_info ()) {
+       for (auto i: environment_info ()) {
                body += i + "\n";
        }
 
@@ -97,11 +101,8 @@ SendProblemReportJob::run ()
                body += "---<8----\n";
        }
 
-       list<string> to;
-       to.push_back ("carl@dcpomatic.com");
-
-       Emailer emailer (_from, to, "DCP-o-matic problem report", body);
-       emailer.send ("main.carlh.net", 2525);
+       Emailer emailer (_from, {"carl@dcpomatic.com"}, "DCP-o-matic problem report", body);
+       emailer.send ("main.carlh.net", 2525, EmailProtocol::STARTTLS);
 
        set_progress (1);
        set_state (FINISHED_OK);