Ernest E Vogelsinger schrieb:

> In your mail headers, you should see some MIME like
>
>         Content-Type: multipart/alternative;
>                 boundary=GU4wuTSk68F
>
> ("alternative" could also read "related" - depends on the content, the
> "multipart" is the point here)
>
> which would tell the client browser that the next mail consists of a couple
> of separate parts, with a separator line as "--GU4wuTSk68F".
>

I had it set like this:

$fp = fopen($file, "r");
$contents = fread($fp, $file_size);
$encoded_file = chunk_split(base64_encode($contents));
fclose($fp);

unset($header);
$header = "FROM:$name_abs<$adresse_abs>\n";
$header.= "MIME-version: 1.0\n";
$header.= "Content-type: multipart/mixed; ";
$header.= "boundary=\"Message-Boundary\"\n";
$header.= "Content-transfer-encoding: 7BIT\n";
$header.= "X-attachments: $file_name";

$body = "--Message-Boundary\n";
$body .= "Content-type: text/plain; charset=US-ASCII\n";
$body .= "Content-Disposition: inline";
$body .= "Content-transfer-encoding: 7BIT\n";
$body .= "Content-description: Mail message body\n\n";
$body .= $text;
$body.= "\n\n--Message-Boundary\n";
$body.= "Content-type: $file_type; name=\"$file_name\"\n";
$body.= "Content-Transfer-Encoding: PLAINTEXT\n";
$body.= "Content-disposition: attachment; filename=\"$file_name\"\n\n";
$body.= "$encoded_file\n";
$body.= "--Message-Boundary--\n";

That's the same as a friend of mine uses it. He's saying it's working fine...
I'll try to do what you told me.
Olli


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to