Cannot use mail function in PHP.
Problem: Cannot send mail via the mail function in PHP script.
Cause: sendmail was not installed by default.
Solution:
1. install sendmail : sudo apt-get install sendmail
2. test : sudo apt-get install nmap
nmap -sT localhost
if sendmail works, you will see
*************************************************
tarting Nmap 4.53 ( http://insecure.org ) at 2008-08-09 06:46 UTC
Interesting ports on tcm (127.0.0.1):
Not shown: 1708 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
80/tcp open http
587/tcp open submission
3306/tcp open mysql
*************************************************
Problem: Cannot send mail via the mail function in PHP script.
Cause: sendmail was not installed by default.
Solution:
1. install sendmail : sudo apt-get install sendmail
2. test : sudo apt-get install nmap
nmap -sT localhost
if sendmail works, you will see
*************************************************
tarting Nmap 4.53 ( http://insecure.org ) at 2008-08-09 06:46 UTC
Interesting ports on tcm (127.0.0.1):
Not shown: 1708 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
80/tcp open http
587/tcp open submission
3306/tcp open mysql
*************************************************
Comments