Login

Username:

Password: 

Join us Now |  Forgot Password? | Forgot UserName?

PHP

Learn step by step



PHP Mail function

The mail() function is used to send a mail. using this we can send mail on a particular address with information and attachment

Parameter

Name Description Required / Optional Type
to Mail address to which you want to send mail  Required String
subject Subject of the mail  Required String
message Message to be sent with the mail. Required String
extra headers Additional headers like from, CC, BCC. If more than one additional headers are used, they must be separated with CRLF (Carriage return line feed), i.e. new line.  Optional string
additional parameters Additional parameters like -  the envelope sender address when using sendmail with the -f sendmail option, can be used using this parameter.  Optional string


<?php
$to = 'fff@xrg.com';<br>$subject = 'Demo mail ';
$message = 'This is a demo mail. ';
mail($to, $subject, $message);
?>


Related Videos