Forum : What type of headers have to be added in the mail function to attach a file?
Brief description  about Online courses   join in Online courses
View Balu  Prasad 's Profile

What type of headers have to be added in the mail function to attach a file?

Hi,
Can anyone tell me What type of headers have to be added in the mail function to attach a file?
Asked by Balu Prasad | Nov 23, 2009 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi balu,

You must add:

$boundary = '--' . md5( uniqid ( rand() ) );
$headers = "From: \"Me\"\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/mixed; boundary=\"$boundary\"";

Nov 23, 2009