PHP Sending Emails

The PHP mail() Function

The PHP mail() function is used to send emails from inside a script.

Syntax:

to The recipient’s email address.Multiple recipients can be specified.
subject The email’s subject line.
message The email body(Original Message).
headers Additional header fields such as “From”, “Cc”, “Bcc” etc.
parameters Any additional parameters.

As soon as the mail function is called PHP will attempt to send the email then it will return true if successful or false if it is failed.

Mail() In Action