Skip to content

Instantly share code, notes, and snippets.

@iamdylanngo
Last active November 22, 2019 09:41
Show Gist options
  • Save iamdylanngo/abd7dc8bf9ded5e888e40096c152deb4 to your computer and use it in GitHub Desktop.
Save iamdylanngo/abd7dc8bf9ded5e888e40096c152deb4 to your computer and use it in GitHub Desktop.
Install and configuration sendmail in ubuntu
# 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