Don't try to send KDM email unless we have a from address.
authorCarl Hetherington <cth@carlh.net>
Sat, 17 Sep 2022 21:36:22 +0000 (23:36 +0200)
committerCarl Hetherington <cth@carlh.net>
Sat, 17 Sep 2022 21:36:22 +0000 (23:36 +0200)
src/lib/kdm_with_metadata.cc

index 5c1ab0aa6fe2e3b2978073d918dedc35b9664969..bebb5df86d0b44f6af12a2c5f371d2e2620eed6e 100644 (file)
@@ -212,6 +212,10 @@ send_emails (
                throw NetworkError (_("No mail server configured in preferences"));
        }
 
+       if (config->kdm_from().empty()) {
+               throw NetworkError(_("No KDM from address configured in preferences"));
+       }
+
        for (auto const& kdms_for_cinema: kdms) {
 
                auto first = kdms_for_cinema.front();