PHP » Miscellaneous » mail()

Syntax:
bool mail(string recipient, string subject, string body [, string headers [, string parameters]])
recipient
Email address(es) of recipient(s).
subject
Subject line.
body
Message.
headers
Additional headers.
parameters
Parameters to pass to sendmail.

Sends an email.

This function sends an email to one or more recipients. If more than one email addresses are specified, they should be separated with commas. On Windows, mail() connects to an SMTP server specified in the php.ini file. The sendmail program is used on Unix. The optional parameters are passed to sendmail. mail() returns TRUE if the email was accepted, and FALSE if it was not.

Examples

Code:
<pre>
<?php

$msg = "Call me.\n\nRegards,\nSomeone Else.";
mail("someone@somedomain.com", "Hi", $msg);
print $msg;

?>
</pre>
Output:
Call me.

Regards,
Someone Else.
Explanation:

An email is sent.