diff --git a/conf/manager.conf.in b/conf/manager.conf.in
index 242db6627206e1a229b6e985c68d44e4c5bbcb1a..dfc649321782435a48b6ce22b1d373cdb29596cc 100644
--- a/conf/manager.conf.in
+++ b/conf/manager.conf.in
@@ -75,3 +75,6 @@ federation_metadata_file_path = @sysconfdir@/edugain-md.xml
 
 # Valid account profiles
 account_profiles = fullset1, limitedset1, generic1, student1, student2, teacher1, teacher2, alumni1, librarywalkin1, employee1, researcher1
+
+# Path to sendmail executable
+sendmail_path = /usr/sbin/sendmail
diff --git a/lib/IdPAccountManager/WebRequest.pm b/lib/IdPAccountManager/WebRequest.pm
index 4062b86703cbfaaad85f2c0906523715fc5fffc9..0f704438531b074be453003ee08c75e4a1d224b2 100755
--- a/lib/IdPAccountManager/WebRequest.pm
+++ b/lib/IdPAccountManager/WebRequest.pm
@@ -364,8 +364,9 @@ sub req_generate_token {
 
     my $sender    = $self->{configuration}->{notice_from};
     my $recipient = $self->{in}->{email_address};
+    my $sendmail  = $self->{configuration}->{sendmail_path};
 
-    open(my $handle, '|-', "/usr/sbin/sendmail -f $sender $recipient") or do {
+    open(my $handle, '|-', "$sendmail -f $sender $recipient") or do {
         push @{ $self->{out}->{errors} }, "mail_notification_error";
         $self->{logger}->errorf("Unable to run sendmail executable: %s", $ERRNO);
         return undef;