In this blog we will see how to send a "Simple Text Email" ?
The Php mail( ) function is used to send Emails in PHP.
There are three main parameters we have to pass for sending a simple email and one is optional parameter.
There 3 parameter are following:-
1- To-(This is specify the email address to send means receiver email.
2-Subject of mail(This is specify the email subject).
3-Content/message(This is specify the message or content of email)
So all the above parameter is very important to send a simple text email
you can take belloe example for better understanding:
<?php
// here define the mail of receiever
$to="example@gmail.com";
// write here subject of the mail
$subject = "Hi";
//write here contents/message of the mail
$message = "Hello i hope you are well";
$headers .= "From: simple text email";
mail($to, $subject, $message, $headers);
?>
0 Comment(s)