From 1447d1a05491a0cde738722f4eca2c6e562bb0da Mon Sep 17 00:00:00 2001 From: Guillaume Rousse <guillaume.rousse@renater.fr> Date: Tue, 7 Nov 2017 16:01:09 +0100 Subject: [PATCH] die if no sendmail executable is available --- lib/IdPAccountManager/Tools.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/IdPAccountManager/Tools.pm b/lib/IdPAccountManager/Tools.pm index 54e02aa..dfc3fb1 100644 --- a/lib/IdPAccountManager/Tools.pm +++ b/lib/IdPAccountManager/Tools.pm @@ -113,6 +113,9 @@ sub update_ssp_authsources { sub mail_notice { my (%args) = @_; + die "unable to send mail, no sendmail executable found" + unless -x '/usr/sbin/sendmail'; + open SENDMAIL, "|/usr/sbin/sendmail -f $args{data}->{from} $args{data}->{to}"; -- GitLab