diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-06-23 01:02:24 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-06-23 01:02:24 +0100 |
| commit | f1d30fb114b3b2c6ccd8fdf5823e7cd6b26c1eef (patch) | |
| tree | c6bd8a27597855baf86663922294850fd41ece3a /src/lib/kdm.cc | |
| parent | e6c67f4aac2ca9afc275b6f13058e1e46f2cecc3 (diff) | |
| parent | 33755d92926f6e9bf7403f3bde8b1d0645e6a618 (diff) | |
Merge master.
Diffstat (limited to 'src/lib/kdm.cc')
| -rw-r--r-- | src/lib/kdm.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/kdm.cc b/src/lib/kdm.cc index c08750961..5754fd469 100644 --- a/src/lib/kdm.cc +++ b/src/lib/kdm.cc @@ -32,6 +32,7 @@ using std::list; using std::string; using std::stringstream; +using std::cout; using boost::shared_ptr; struct ScreenKDM @@ -228,7 +229,9 @@ email_kdms ( quickmail_initialize (); quickmail mail = quickmail_create (Config::instance()->kdm_from().c_str(), "KDM delivery"); quickmail_add_to (mail, i->cinema->email.c_str ()); - + if (!Config::instance()->kdm_cc().empty ()) { + quickmail_add_cc (mail, Config::instance()->kdm_cc().c_str ()); + } string body = Config::instance()->kdm_email().c_str(); boost::algorithm::replace_all (body, "$CPL_NAME", film->dcp_name ()); stringstream start; @@ -237,6 +240,12 @@ email_kdms ( stringstream end; end << to.date() << " " << to.time_of_day(); boost::algorithm::replace_all (body, "$END_TIME", end.str ()); + boost::algorithm::replace_all (body, "$CINEMA_NAME", i->cinema->name); + stringstream screens; + for (list<ScreenKDM>::const_iterator j = i->screen_kdms.begin(); j != i->screen_kdms.end(); ++j) { + screens << j->screen->name << ", "; + } + boost::algorithm::replace_all (body, "$SCREENS", screens.str().substr (0, screens.str().length() - 2)); quickmail_set_body (mail, body.c_str()); quickmail_add_attachment_file (mail, zip_file.string().c_str(), "application/zip"); |
