Hi, lot of solutions are there to fix this problem but I feel somewhere, sometimes we miss the basic part... It may be possibility that we don't have sendemail utility itself not installed. Please install by running following command. sudo apt-get install sendmail -y If issue is still there please check following link: https://www.digitalocean.com/community/questions/do-i-need-to-configure-anything-to-use-php-mail-function-on-fresh-lamp-install Thanks!!!! Enjoy Programming :)