Sending emails from localhost with SSMTP


/ Published in: Other
Save to your folder(s)



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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.