Using PHP Mailer
git clone https://github.com/hatixntsoa/php.mail.git- php
sudo apt install php php-mysql
- Database
sudo apt install mariadb-client mariadb-server
- Start the mariadb-server
sudo systemctl start mariadb
- Login into the local server as root and create a new user phpmail
sudo mariadb -u root -p -e "CREATE USER 'phpmail'@'localhost' IDENTIFIED BY 'mail';"- Create the Database
sudo mariadb -u root -p -e "CREATE DATABASE IF NOT EXISTS mail;"- Give the right privilege into the new user
sudo mariadb -u root -p -e "GRANT ALL PRIVILEGES ON mail.* TO 'phpmail'@'localhost';"sudo mariadb -u root -p -e "FLUSH PRIVILEGES;"
- Move the source code into the
/var/www/htm/directory
sudo rsync -a -v --exclude='.git' --exclude='README.md' ./ /var/www/html- Launch the web server for example Apache2
sudo systemctl start apache2- Finally type localhost in your web-browser