• My PHP Pages

    This is a complete and free PHP programming course for beginners. Everything you need to get started is set out in section one below.

Sep 24, 2013

Posted by Unknown
3 comments | 12:51 AM
you can send emails using PHP. for send emails  we can use mail() php function. look at below example and change variable values to yours. this script is working with gmail too..

$to      = 'yourmail@mail.com';
$subject = 'Your Subject Goes Here';
$message = '



Your Mail Body Goes Here... !
'; $headers = "From: " . strip_tags($_POST['req-email']) . "\r\n"; $headers .= "Reply-To: ". strip_tags($_POST['req-email']) . "\r\n"; $headers .= "CC: php@example.com\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; mail($to, $subject, $message, $headers); echo '
Sent Successfully !..
';

3 comments :