php mail function - PHP Views : 325
Tagged in : PHP
0 0
Send mail
php mail function:

mail() function is used in php to send a mail.
<?php
$to = 'username@yourdomainname.com';
$subject = 'Test';
$message = 'Hi';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers = 'From: support@hscripts.com';
@mail($to, $subject, $message, $headers);
?>


You can also have multiple headers,
$headers .= 'To: Prisur , Sowmy ' . "rn";
$headers .= 'From: Support ' . "rn";
$headers .= 'Cc: Amy@test.com' . "rn";
$headers .= 'Bcc: garcia@test.com' . "rn";

Use mail() in php to send a mail.Razz
By Ramya, On - 2009-12-07



    Login to add Comments .