For most general PHP functions like mail(), XAMPP package always works well on Win32 platform with its pre-defined settings. For linux distro like Ubuntu, you need to do extra steps to make it work.
1. You must be sure that you have run the following commands:
2. Come to your php.ini and edit like this (you'd better search php.ini yourself by issuing 'locate' command):
3. One extra thing to fix unqualified host name issue with error message like 'unable to qualify my own domain name'. Open and edit /etc/hosts as follows:
Let's say you have your machine locally named 'yourserver', add it with postfix '.local'
127.0.0.1 yourserver.local localhost
4. Restart Apache server or your LAMPP server to make PHP settings effective.
Now your PHP code should work on using mail() function for sending email message out.
No comments:
Post a Comment