Created
July 10, 2015 14:36
-
-
Save savelee/6701c707b8f5805c9cf7 to your computer and use it in GitHub Desktop.
Setup php mail Ubuntu digital ocean
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//login to your droplet. | |
//1. output the hostname | |
hostname | |
//2. modify the hosts | |
nano /etc/host | |
//3. the first line in this file, should use the hostname on the end. For example: "Lee" | |
127.0.0.1 localhost localhost.domainname Lee | |
//4. install mail | |
sudo apt-get install sendmail | |
//5. configure the mail, answer yes to everything: | |
sudo sendmailconfig | |
//6. Restart apache2 | |
sudo service apache2 restart |
@cinghamman
How do you output the hostname? what do you mean by hostname? the domain name u mean?
Hostname will be your domain name , in digital ocean it will return name of droplet : if you type on terminal "hostname"
Please, correct
//2. modify the hosts
nano /etc/host
on
//2. modify the hosts
nano /etc/hosts
Thanks for this. If php.ini sendmail_path has been modified and things still don't work try reverting sendmail_path to the default value or commenting that line out. Save php.ini then repeat $ sudo service apache2 restart
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do you output the hostname? what do you mean by hostname? the domain name u mean?