Monday, 18 June 2012

what's function use to send mail in php ?


<?php// multiple recipients$to  = 'jafarkhanphp@gmail.com' . ', '; // note the comma
// subject$subject = 'Enter Subjects';// message$message = 'you can massage to html formate';// To send HTML mail, the Content-type header must be set$headers  = 'MIME-Version: 1.0' . "\r\n";$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";// Additional headers$headers .= 'To: Mary <to@example.com>, other<other@example.com>' . "\r\n";
$headers .= 'Cc: cc@example.com' . "\r\n";$headers .= 'Bcc: bcc@example.com' . "\r\n";
/*** for attachments use this type header ********************/

 //$header .= "Content-Type: application/octet-stream; name=\"".$filename."\"\r\n"; // use different content types here
 //$header .= "Content-Transfer-Encoding: base64\r\n";
 //$header .= "Content-Disposition: attachment; filename=\"".$filename."\"\r\n\r\n";
    $header .= $content."\r\n\r\n";
/******************************************************************/// Mail itmail($to, $subject, $message, $headers);?>

2 comments:

  1. Hi

    I read this post two times.

    I like it so much, please try to keep posting.

    Let me introduce other material that may be good for our community.

    Source: Apple interview questions

    Best regards
    Henry

    ReplyDelete
  2. Nice question and more interview question on http://www.tutorialsolution.com/

    ReplyDelete