Last active
November 22, 2019 09:41
-
-
Save iamdylanngo/abd7dc8bf9ded5e888e40096c152deb4 to your computer and use it in GitHub Desktop.
Install and configuration sendmail in ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install sendmail | |
sudo apt install sendmail | |
sudo service sendmail restart | |
sudo service php7.2-fpm restart | |
# Send email by command | |
echo "test message" | sendmail -v [email protected] | |
# Edit localhost | |
127.0.0.1 localhost localhost.localdomain <computername> <username> // Nếu nó báo waring thằng nào thì add thằng đó vào :D | |
# Edit | |
sudo vim /etc/mail/sendmail.cf | |
- Uncomment | |
O HostsFile=/etc/hosts | |
# Config for php7.2-fpm | |
sendmail_path = "/usr/sbin/sendmail -t" | |
# Fix in docker | |
echo "127.0.0.1 localhost localhost.localdomain" >> /etc/hosts | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment