Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bajpangosh/0bdbe449d3af82f478faaba77cf2d62b to your computer and use it in GitHub Desktop.
Save bajpangosh/0bdbe449d3af82f478faaba77cf2d62b to your computer and use it in GitHub Desktop.
Install and Test Sendmail on Ubuntu VPS
sudo apt-get install php-pear
sudo pear install mail
sudo pear install Net_SMTP
sudo pear install Auth_SASL
sudo pear install mail_mime
sudo apt-get install postfix
## It'll shows a dialog box and select "Internet site" next, type "localhost" ok.
## Reboot apache
sudo service apache restart
##Finally test an sample mail via Terminal.
echo "Subject: sendmail test" | sendmail -v yourid@email.com
@bajpangosh
Copy link
Author

Where Is Sendmail And Its Configuration Files Located?
which sendmail

it'll shows "/usr/sbin/sendmail"

if the path is wrong fix it.
edit sudo vi /etc/php5/apache2/php.ini
set sendmail path to /usr/sbin/sendmail -t -i

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment