read
To be able to send email trought mail() function in php without set the complete smtp server you can use msmtp, first you need to install msmtp
create a config file
with the follow lines
create a log file /var/log/msmtp.log, set permissions
comment the lines on /etc/php5/apache2/php.ini
if everything is working fine you are ok, if you have any problems you can try
and sent it with