Don’t simply test for the presence of the magic Paperclip attribute, it will return a paperclip Attachment object and thus always be true:
- if user.photo.present? # always true
= image_tag(user.photo.url)
This should help you get Sendmail installed with basic configuration on Ubuntu.
sudo apt-get install sendmail
/etc/hosts
file: nano /etc/hosts
127.0.0.1 localhost yourhostname
sudo sendmailconfig
sudo service apache2 restart