Does MFOP require special headers

floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2004-01-17 00:28

I have been testing MFOP to add photos and captions to gallery. Using email from my Eudora mail client is successful and like it very much. I have been tying to use the php mail() command to do the same but I have only been able to get the photo to show and not the caption. Is there some special format (headers) that MFOP uses in the email is processes?

Here is my relevant code:

$headers = "From: ".$email_from;

                      $semi_rand = md5(time());
                      $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";

                      $headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\"";
                      $email_message = "--{$mime_boundary}\n" . "Content-Type: {$fileatt_type};\n" . " name=\"{$fileatt_name}\"\n" . "Content-Disposition: attachment;\n" . " filename=\"{$fileatt_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n" ."--{$mime_boundary}--\n";

                      $data = chunk_split(base64_encode($data));

                      $email_message .= "This is a multi-part message in MIME format.\n\n" . "--{$mime_boundary}\n" . "Content-Type:text/html; charset=\"iso-8859-1\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $email_message . "\n\n";
                      $sending_ok = @mail($email_to, $email_subject, $email_message, $headers);

Thanks in advanced,
Cheers,
Dave

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Sat, 2004-01-17 00:34

MFOP is a separate project: support for it is on the MFOP site, not here...

It's great to hear people are using it, though.