How to use E-mail in PHP

In this article I will go to explain about PHP E-mails.
  • 1947

PHP E-mails

E-mail is the most popular internet service today. PHP E-mails also provide mail transferring facility.

Syntax of  PHP E-mail


Parameters in PHP E-mail

There are following parameters in PHP E-mail:

Parameter Description
to Here write receiver Email.
subject Write the subject of the email.
message Here write that message who want to send.
headers It is optional, Here specifies additional header like cc,bcc.
parameters It is optional.

Example of  E-mail




$to = "[email protected]";

$subject = "Write Subject related information here";

$message = "Here write simple email message.";

$from = "[email protected]";

$headers = "From:" . $from;


echo "Your mail has been sent";




You may also want to read these related articles :here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.