title: php mail function not working on Digital Ocean
body: <p>I have a Ubuntu 14.0 server running with NginX on Digital Ocean .</p>
  
  <p>I tried to add following PHP code </p>
  
  <pre><code>@mail($email_to, $email_subject, $email_message, $headers); 
  </code></pre>
  
  <p>But its not working </p>
  
  <p>so I googled and followed following tutorial</p>
  
  <pre><code>https://holarails.wordpress.com/2013/11/17/configure-sendmail-in-ubuntu-12-04-and-make-it-fast/
  </code></pre>
  
  <p>So now My hots file look like this </p>
  
  <pre><code># Your system has configured 'manage_etc_hosts' as True.
  # As a result, if you wish for changes to this file to persist
  # then you will need to either
  # a.) make changes to the master file in /etc/cloud/templates/hosts.tmpl
  # b.) change or remove the value of 'manage_etc_hosts' in
  #     /etc/cloud/cloud.cfg or cloud-config from user-data
  127.0.1.1 iclock iclock
  #127.0.0.1 localhost
  
  127.0.0.1 localhost localhost.localdomain iclock
  
  # The following lines are desirable for IPv6 capable hosts
  ::1 ip6-localhost ip6-loopback
  fe00::0 ip6-localnet
  ff00::0 ip6-mcastprefix
  ff02::1 ip6-allnodes
  ff02::2 ip6-allrouters
  ff02::3 ip6-allhosts
  </code></pre>
  
  <p>and then I run following command</p>
  
  <pre><code>sendmailconfig
  </code></pre>
  
  <p>But still when I try sending Email its not working .</p>
  
  <p>Any help would be Appreciated .</p>
  
  <p>Thanks</p>