mailing in PHP using mail function..

First the syntax of the mail function is ..

mail($to$subject$message$headers);

$to-> to mail ID

$subject->the sub of the mail.

$message->the actual text message to send to the $to.

$headers->can contain the info regarding from or purpose..

and finally define the variables ..

$to=’kumargandhi30@gmail.com’;

$subject=’How are U my Friend?’;

$message=’hi kumar’;

$headers=’From:me@gmail.com’;

and now call the function.. mail($to$subject$message$headers);

this will send a mail to the mentioned..

Leave a Reply