Basically there is a custom class Mail that extends Zend\Mail\Message and uses Zend\Mail\Transport\Smtp to send mails with HTML template, it works very nice, it's not written by me. It was working on a ubuntu server and it works on localhost, but it's not working on a CentOS 7 server. I've tried everything there it is on the web, "service sendmail restart/start/status" returns No such file or directory even though which sendmail shows /usr/sbin/sendmail. I'm not very familiar with linux.