php mail function
by Ramya[ Edit ] 2009-12-07 15:26:58
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.