PHP function mail()

Availability in PHP 4.0

Send mail

Parameters

Parameter Data type Default value Note
$to string not Receiver, or receivers of the mail.
$subject string not Subject of the email to be sent.
$message string not
$additional_headers string null, String to be inserted at the end of the email header.
$additional_parameters string null The additional_parameters parameter can be used to pass additional flags as command line options to the program configured to be used when sending mail, as defined by the sendmail_path configuration setting. For example, this can be used to set the envelope sender address when using sendmail with the -f sendmail option.

Return Values

bool

true if the mail was successfully accepted for delivery, false otherwise.

It is important to note that just because the mail was accepted for delivery, it does NOT mean the mail will actually reach the intended destination.

Other Resources

Official mail documentation

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.