I have a dedicated server which I want to use to run a LAMP stack on. Now, I want to use php mail on that server.
How do I go about doing that?
PS: it is an ubuntu server.
Thanks
Personally I prefer Exim, the below steps will get a system up and going for outgoing mail only.
apt-get install exim4 exim4-daemon-light
Once exim is already configured you can run though this setup again by using the command dpkg-reconfigure exim4-config
You might want to consider choosing to use the Smarthost options during the above setup and direct your mail through an already established SMTP server that will relay for you. The other server will have probably already handled getting the DNS records setup correctly.
You need to setup your system as a mail server. Have a look at the following documentation: https://help.ubuntu.com/community/MailServer
I prefer to have PHP use our regular mail server as it has the correct reverse DNS entries, security patches etc.
If you use PHPMailer you can easily use your regular SMTP server - it does authentication too!
For the Windows People: Hamster Classic is the way to go if your developing on Windows. You can get a test mail server running in just a few minutes and it allows to to inspect the mail packets in detail.