Fix FFmpegExaminer termination condition when there is no video;
[dcpomatic.git] / src / lib / emailer.h
index 7a614019e3c7e7c1a031250f323622d5093d2212..78942ad1e15b06913f15fe1c8817f1f0a318e1dd 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2015-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #include <curl/curl.h>
 #include <boost/scoped_array.hpp>
 
+
 class Emailer
 {
 public:
-       Emailer (std::string from, std::list<std::string> to, std::string subject, std::string body);
+       Emailer(std::string from, std::vector<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 (std::string server, int port, std::string user = "", std::string password = "");
+       void send (std::string server, int port, EmailProtocol protocol, std::string user = "", std::string password = "");
 
        std::string notes () const {
                return _notes;
@@ -44,16 +46,19 @@ public:
                return _email;
        }
 
-       static std::string address_list (std::list<std::string> addresses);
+       static std::string address_list(std::vector<std::string> addresses);
 
 private:
 
+       std::string fix (std::string s) const;
+       static std::string encode_rfc1342 (std::string subject);
+
        std::string _from;
-       std::list<std::string> _to;
+       std::vector<std::string> _to;
        std::string _subject;
        std::string _body;
-       std::list<std::string> _cc;
-       std::list<std::string> _bcc;
+       std::vector<std::string> _cc;
+       std::vector<std::string> _bcc;
 
        struct Attachment {
                boost::filesystem::path file;
@@ -61,7 +66,7 @@ private:
                std::string mime_type;
        };
 
-       std::list<Attachment> _attachments;
+       std::vector<Attachment> _attachments;
        std::string _email;
        size_t _offset;
        std::string _notes;