> On Sun 30 Dec 07, tedd wrote:
> > I'm trying to send an image via email (hmm, must be an echo).
> > In any event, the following is my main-code (word, dude) and a part
> > of the email I receive back. The image file IS there.
> > Any suggestions as to what I'm doing wrong?
> >
> > -- the code --
> > $msg .= "Content-Disposition: attachment;
> > filename=\"".$filename."\"".$eol.$eol;
> > $msg .= $f_contents.$eol.$eol;

On Mon 31 Dec 07, Eddie Dunckley wrote:
> guess/think that should read:
> $msg .= $f_contents.$eol. $boundary . "---" . $eol;
> i.e. message needs a closing boundary terminated with either 2 or 3
> dashes (cant remember off-hand).

oops .. didnt read properly.
$msg .= $f_contents . $eol . '--' . $mime_boundary . "---" . $eol.$eol;

send yourself an email with an attachment and view the email source and 
compare with your program output.

or you could just google for MIME.class site:*.phpbuilder.net and
download and use it like


require_once("MIME.class");

// check if parm bcc is in lib, think its not.
$msg = new MIME_mail($from, $to,$cc,$bcc, $subject); 

$msg->fattach($filename); 
// parms = $path, $description, $contenttype=OCTET, $encoding=BASE64,
//$disp='inline' etc, view the mime class to see options

$msg->send_mail();


-- 
Eddie
Dreams are free, but you get soaked on the connect time.

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

Reply via email to