@Felipe-Reis In my case, sendmail could not be executed because it was located in /usr/sbin, which wasn't in my $PATH variable.

export PATH=$PATH:/usr/sbin did the trick. You'll probably want to add it to your init script, or if you're running NodeBB manually, then add it to your bash script or run it by hand before starting NodeBB.