Cegonsoft Php Training | mailing function in php
Cegonsoft is a Bangalore based IT Training and Software Development center which providing training and placement in Java,.Net,Php&Mysql,lamp,Ria,phython,software testing and web 2.0 etc..
PHP mail() Function:
PHP mail() function is used to send mails from ome person to another person.
Syntax:
mail(to, subject, message, headers, parameters);
Parameter Description
to . The recipient's email address. <required>
Subject The email's subject line. <required>
message, The actual email body. <required>
Headers Additional information <optional>
parameters Any additional parameters. <optional>
Example:
<?php
$to = "person1@example.com";
$subject = "WELCOME";
$message = " Welcome to our website";
$from = "person2@example.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
?>
|