Sunday, April 1, 2012

How to send a mail using PHP

Using PHP we can send mail very easily
mailSend mail
mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] );

<?php
$to
= 'test@example.com';$subject = 'Subject';$message = 'Hai this is test description';$headers = 'From: test1@example.com' . "\r\n" .
'Reply-To: test2@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);?>




No comments:

Post a Comment