Re: [PHP] mail() with images *embedded*

2002-05-24 Thread m u i n a r

Works! It was the order how headers and message were composed
in the script. Now even my Eudora displays it fine.

Now I'm gonna switch back to my old email settings... ;)

Thanks for having time.

Mike

At 11:51 24.05.02, you wrote:
>Can I assume that Eudora /does/ show inline images given a 'correctly'
>formatted email? For example in Outlook send yourself an (html) email with
>images interspersed in some text then view in Eudora.
>
>It may be that this inline images thing is peculiar to M$ and other mail
>clients don't want to know about it ...?


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




Re: [PHP] mail() with images *embedded*

2002-05-24 Thread Jason Wong

On Friday 24 May 2002 17:24, m u i n a r wrote:
> Outlook shows the images inline... *and* attaches them to the end of the
> email - is that standard?

Not with *my* code :)

It only displays it inline (it's actually a table with a column for picture 
and some columns for description and other info).

> (It's a horror to work with Outlook and this kind of setup, so I can't
> really tell myself - brrr... )

Using Outlook is a horror period 

> Since Eudora doesn't display the inline images, though I tried all
> possible and impossible settings, I assume there's still an error in
> the code?

Can I assume that Eudora /does/ show inline images given a 'correctly' 
formatted email? For example in Outlook send yourself an (html) email with 
images interspersed in some text then view in Eudora.

It may be that this inline images thing is peculiar to M$ and other mail 
clients don't want to know about it ...?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
You can never do just one thing.
-- Hardin
*/


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




Re: [PHP] mail() with images *embedded*

2002-05-24 Thread m u i n a r

Outlook shows the images inline... *and* attaches them to the end of the
email - is that standard?

(It's a horror to work with Outlook and this kind of setup, so I can't
really tell myself - brrr... )

Since Eudora doesn't display the inline images, though I tried all
possible and impossible settings, I assume there's still an error in
the code?

TIA

Mike


At 10:34 24.05.02, you wrote:
>On Friday 24 May 2002 15:36, m u i n a r wrote:
>
>[snip]
>
> > The encoding works, the message looks fine, just the images are not
> > embedded but attached. Aaargh  :(
>
>Like I said before it, what I had works on Outlook and not on KMail. As my
>client only uses Outlook and it worked I didn't do any further investigation.
>
>So, try it on Outlook and see what you get.


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




Re: [PHP] mail() with images *embedded*

2002-05-24 Thread Jason Wong

On Friday 24 May 2002 15:36, m u i n a r wrote:

[snip]

> The encoding works, the message looks fine, just the images are not
> embedded but attached. Aaargh  :(

Like I said before it, what I had works on Outlook and not on KMail. As my 
client only uses Outlook and it worked I didn't do any further investigation.

So, try it on Outlook and see what you get.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
You will be divorced within a year.
*/


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




Re: [PHP] mail() with images *embedded*

2002-05-24 Thread m u i n a r

At 08:44 24.05.02, you wrote:
>I used:
>
>   cid:01.jpg\"; width=\"600\" height=\"75\">

... after the html I have:

 $file = "01.jpg";
 $path = "/usr/www/users/muinar/rtj/i/newsletter-title.jpg";
 $fp = fopen( $path,"r" );
 $attachment = fread( $fp,filesize( $path ) );
 $attachment = chunk_split( base64_encode( $attachment ) );
 fclose( $fp );
 $html_body .= "--$boundary\n"
  . "Content-Type: image/jpeg; name=\"$file\"\n"
  . "Content-Transfer-Encoding: base64\n"
  . "Content-ID: <$file>\n"
  . "Content-Disposition: inline; filename=\"$file\"\n"
  . "\n"
  . $attachment . "\n"
  . "\n\n";

The encoding works, the message looks fine, just the images are not embedded
but attached. Aaargh  :(



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




Re: [PHP] mail() with images *embedded*

2002-05-23 Thread Jason Wong

On Friday 24 May 2002 14:09, m u i n a r wrote:
> At 06:05 24.05.02, you wrote:
> >On Friday 24 May 2002 04:15, m u i n a r wrote:
> > > Hi Listees  ;)
> > >
> > > After several hours of googling and testing, I'm asking the list for
> > > some help with this PHP mail() question: How do you send email with
> > > images *embedded* in the message?
> >
> >To find out how it was done, what I did was to use Outlook to send myself
> >some
> >html mail with embedded images then I examined the message source :)
>
> The image src is replaced by the local source of the recipient. This is
> where I'm stuck. How do you reference to the image?

I used:

  http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] mail() with images *embedded*

2002-05-23 Thread m u i n a r

At 06:05 24.05.02, you wrote:
>On Friday 24 May 2002 04:15, m u i n a r wrote:
> > Hi Listees  ;)
> >
> > After several hours of googling and testing, I'm asking the list for some
> > help with this PHP mail() question: How do you send email with images
> > *embedded* in the message?
>
>To find out how it was done, what I did was to use Outlook to send myself 
>some
>html mail with embedded images then I examined the message source :)

The image src is replaced by the local source of the recipient. This is where
I'm stuck. How do you reference to the image?


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




Re: [PHP] mail() with images *embedded*

2002-05-23 Thread Jason Wong

On Friday 24 May 2002 04:15, m u i n a r wrote:
> Hi Listees  ;)
>
> After several hours of googling and testing, I'm asking the list for some
> help with this PHP mail() question: How do you send email with images
> *embedded* in the message?

To find out how it was done, what I did was to use Outlook to send myself some 
html mail with embedded images then I examined the message source :)

> (I managed to send them embedded with real URLs so they are d'loaded when
> the message is viewed - but here we need to send the images together with
> the email)
>
> I'm using Content-Disposition: inline... though the images in the message
> itself are broken while attached at the bottom instead.
>
> Tried some combinations of cid:03.gif";> in the message and
> Content-ID: <03.gif> in the header - didn't work... what is it that I'm
> missing here?

First of all, have you tried viewing your mail using some other mail client? 
In my application the mail works fine when in Outlook, but viewed in KMail 
the result is "the images in the message itself are broken while attached at 
the bottom instead".

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Is your job running?  You'd better go catch it!
*/


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