I have a Ubuntu Server 12.04 use to run my Webapp. I assume my Webapp wrote in PHP5, run-time enviroment is LAMP, domain is mywebapp.com
. When visitor register account on mywebapp.com, website will send a confirm email automatically. But my system cannot send mail to user's inbox.
I don't think the code of mywebapp.com has error, because it uses the built-in function mail()
and runs well on hostgator.com and Hostpapa.com. I have tried installing sendmail
by using the command sudo apt-get install sendmail
. But nothing changed.
Can you help me configure this system so that mywebapp.com can send mails to users automatically, without using a 3rd party email service like as Gmail or Hotmail, just using the mail()
function; all aspects of the problem, about:
- Config DNS records
- What are app/packages need to install on Ubuntu Server 12.04
- Config router: open port, NAT,...
- Config Apache, PHP.ini or other
sendmail
isn't exactly the most intuitive mail server around. Try Postfix or Exim instead; I prefer Postfix myself, but both are reasonably easy to configure and pretty sane by default. Also, check your system logs to see what the error might be; chances are there's something pretty clear in either /var/log/messages or one of /var/log/mail*.mail()
or something like that.