To use the mail() function, you first need to set up several directives in php.ini.
If you are using a SMTP server on the same machine, you need to set:
SMTP=localhost
If you are using an external server,
SMTP = smtp.gmail.com
After setting up SMTP server, you also can set up the default from email address, which can be overrided by the mail() function:
sendmail_from = admin@abacin.com
After making these configuration changes, restart the Web server.
The mail() function has 5 parameters:
1. Recipient address
2. Subject
3. Message
4. Any other headers (optional)
5. Other configuration options for your SMTP server (optional)
Authorization is required to write a comment.
If you are an Abacin member, please log in first.
If you haven't registered, take a minute to finish this simple and free registration ,
which is only used to manage your postings in Abacin.com.
|
| |