summaryrefslogtreecommitdiff
path: root/src/lib/kdm_with_metadata.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-03-07 16:40:03 +0100
committerCarl Hetherington <cth@carlh.net>2024-03-07 16:40:03 +0100
commit0a93c0df8fd6a40b627cc53d51a249628db6b795 (patch)
treed8aa0df9e1e4cf69014b659aae5dbcc472e75911 /src/lib/kdm_with_metadata.cc
parentf610a8708f11d6052a995f31cd506bc93faafa1c (diff)
Store attachment contents in the Email object.
Diffstat (limited to 'src/lib/kdm_with_metadata.cc')
-rw-r--r--src/lib/kdm_with_metadata.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/kdm_with_metadata.cc b/src/lib/kdm_with_metadata.cc
index e7d9aa31c..971eeac76 100644
--- a/src/lib/kdm_with_metadata.cc
+++ b/src/lib/kdm_with_metadata.cc
@@ -268,6 +268,7 @@ send_emails (
}
email.add_attachment (zip_file, container_name_format.get(first->name_values(), ".zip"), "application/zip");
+ dcp::filesystem::remove(zip_file);
auto log_details = [](Email& email) {
dcpomatic_log->log("Email content follows", LogEntry::TYPE_DEBUG_EMAIL);
@@ -279,13 +280,10 @@ send_emails (
try {
email.send (config->mail_server(), config->mail_port(), config->mail_protocol(), config->mail_user(), config->mail_password());
} catch (...) {
- dcp::filesystem::remove(zip_file);
log_details (email);
throw;
}
log_details (email);
-
- dcp::filesystem::remove(zip_file);
}
}