Posted By

takel on 12/26/10


Tagged

mail ubuntu ssmtp


Versions (?)

Sending emails from localhost with SSMTP


 / Published in: Other
 

  1. sudo apt-get install ssmtp
  2. sudo geany /etc/ssmtp/ssmtp.conf
  3.  
  4. Paste to config
  5. ---------------
  6. hostname=ubuntu
  7. AuthUser=[email protected]
  8. AuthPass=password
  9. FromLineOverride=YES
  10. mailhub=smtp.gmail.com:587
  11. UseSTARTTLS=YES
  12.  
  13. sudo geany /etc/php5/apache2/php.ini
  14.  
  15. Paste this to php.ini
  16. ---------------------
  17. sendmail_path = /usr/sbin/ssmtp -t
  18.  
  19. To verify if the server is sending emails, send a test email:
  20. -------------------------------------------------------------
  21. ssmtp [email protected]
  22.  
  23. You can check if the email are sent by running the following in a second terminal (ALT+F2):
  24. ------------------------------------------------------------------------------------------
  25. tail -f /var/log/mail.log

Report this snippet  

You need to login to post a comment.