PHP Mail Functions
- Previous Page PHP LibXML
- Next Page PHP Math
PHP Mail Introduction
HTTP functions allow you to send email directly from the script.
Requirements
To make the mail functions available, PHP needs a mail system that is installed and running. The program to be used is defined by the configuration settings in the php.ini file.
Installation
Mail functions are part of the PHP core and can be used without installation.
Runtime Configuration
The behavior of the mail functions is affected by php.ini.
Mail Configuration Options
Name | Default | Description | Changeable |
---|---|---|---|
SMTP | "localhost" | Windows Specific: The DNS name or IP address of the SMTP server. | PHP_INI_ALL |
smtp_port | "25" | Windows Specific: SMTP port. Available since PHP 4.3. | PHP_INI_ALL |
sendmail_from | NULL | Windows Specific: Specifies the "from" address used in emails sent from PHP. | PHP_INI_ALL |
sendmail_path | NULL | Unix System Specific: Specifies the path to the sendmail program (usually /usr/sbin/sendmail or /usr/lib/sendmail) | PHP_INI_SYSTEM |
PHP Mail Functions
PHP:Indicates the earliest PHP version that supports this function.
Function | Description | PHP |
---|---|---|
ezmlm_hash() | Calculates the hash value required for the EZMLM mailing list system. | 3 |
mail() | Allows you to send email directly from the script. | 3 |
- Previous Page PHP LibXML
- Next Page PHP Math