+
+ boost::filesystem::path zip_file = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
+ boost::filesystem::create_directories (zip_file);
+ zip_file /= container_name_format.get(name_values, ".zip");
+ make_zip_file (i, zip_file, filename_format, name_values);
+
+ string subject = config->kdm_subject();
+ boost::algorithm::replace_all (subject, "$CPL_NAME", cpl_name);
+ boost::algorithm::replace_all (subject, "$START_TIME", name_values['b']);
+ boost::algorithm::replace_all (subject, "$END_TIME", name_values['e']);
+ boost::algorithm::replace_all (subject, "$CINEMA_NAME", i.front()->cinema()->name);
+
+ string body = config->kdm_email().c_str();
+ boost::algorithm::replace_all (body, "$CPL_NAME", cpl_name);
+ boost::algorithm::replace_all (body, "$START_TIME", name_values['b']);
+ boost::algorithm::replace_all (body, "$END_TIME", name_values['e']);
+ boost::algorithm::replace_all (body, "$CINEMA_NAME", i.front()->cinema()->name);
+
+ string screens;
+ BOOST_FOREACH (KDMWithMetadataPtr j, i) {
+ optional<string> screen_name = j->get('n');
+ if (screen_name) {
+ screens += *screen_name + ", ";
+ }