May 11, 2021 PHP
PhP sends e-mail messages by using the mail() function.
The mail() function allows you to send e-mail directly from the script.
For mail functions to be available, PHP requires an installed and running messaging system. The program to use is defined .ini configuration settings in the php file.
The Mail function is part of the PHP core. These functions can be used without installation.
The behavior of the Mail function is affected .ini settings in the php file.
Mail configuration options:
name | default | describe | Can change |
---|---|---|---|
SMTP | "localhost" | Windows dedicated: SMTP server DNS name or IP address. | PHP_INI_ALL |
smtp_port | "25" | Windows dedicated: SMTP port number.It is available from PHP 4.3. | PHP_INI_ALL |
sendmail_from | NULL | Windows dedicated: Specifies the "from" address used in emails sent by PHP. | PHP_INI_ALL |
sendmail_path | NULL | Unix system dedicated: Specify the path to the Sendmail program (usually / usr / sbin / sendmail or / usr / lib / sendmail). | PHP_INI_SYSTEM |
PHP: Indicates the earliest version of PHP that supports the function.
function | describe | PHP |
---|---|---|
ezmlm_hash() | Calculate the hash value required for the EZMLM mailing list system. | 3 |
mail() | Allows you to send emails directly from the script. | 3 |
No.