Log full email body to DEBUG_EMAIL.
[dcpomatic.git] / src / lib / emailer.h
index 89993ca48f4923cd6668e29aa923370102c13a9f..5924e79b1d8c6c30a97dcb672077921aa2e59d62 100644 (file)
 class Emailer
 {
 public:
-       Emailer (std::string from, std::string to, std::string subject, std::string body);
+       Emailer (std::string from, std::list<std::string> to, std::string subject, std::string body);
 
        void add_cc (std::string cc);
        void add_bcc (std::string bcc);
        void add_attachment (boost::filesystem::path file, std::string name, std::string mime_type);
 
-       void send (boost::shared_ptr<Job> job);
+       void send (std::string server, int port, std::string user = "", std::string password = "");
 
        std::string notes () const {
                return _notes;
@@ -38,11 +38,17 @@ public:
        size_t get_data (void* ptr, size_t size, size_t nmemb);
        int debug (CURL* curl, curl_infotype type, char* data, size_t size);
 
-private:
+       /** @return full email, after send() has been called */
+       std::string email () const {
+               return _email;
+       }
+
        static std::string address_list (std::list<std::string> addresses);
 
+private:
+
        std::string _from;
-       std::string _to;
+       std::list<std::string> _to;
        std::string _subject;
        std::string _body;
        std::list<std::string> _cc;