This should help you get Sendmail installed with basic configuration on Ubuntu.
- If sendmail isn't installed, install it:
sudo apt-get install sendmail - Configure
/etc/hostsfile:nano /etc/hosts - Make sure the line looks like this:
127.0.0.1 localhost yourhostname - Run Sendmail's config and answer 'Y' to everything:
sudo sendmailconfig - Restart apache
sudo service apache2 restart - $ echo "Subject: sendmail test" | sendmail -v SOMETHING@SOMEMAIL.COM
RAILS - Sending via Local Sendmail:
If you want to send the e-mails in the traditional way via local sendmail, then you need to insert the following lines into your configuration file config/environments/development.rb (for the development environment) or config/environments/production.rb (for your production environment):
config.action_mailer.delivery_method = :sendmail
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true