[PHP] wordwrap doesn't work for customer's Outlook

2002-06-25 Thread m u i n a r

Is there really no solution to this issue? Is everyone using
wordwrap to wrap their newsletter texts, or is there a way that
works as well with Ms Outlook?

Thanks a lot

Recap:
- Ms Outlook gets everything on 1 line when I use wordwrap( $text,76,\r\n ).
- Ms Outlook shows nice line breaks when they are hard-coded in the script.

At 23:33 24.06.02, you wrote:

So can anyone tell me what is the difference between wordwrap and
these hard-coded lines? Is wordwrap not safe for use in newsletter
sending scripts? Why is $newtext = wordwrap( $text,76,\r\n );
not sufficient?

Thanks a lot



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




[PHP] wordwrap doesn't work for customer's Outlook

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

Hello

What would *you* do if you wordwrap a text and send it via the
mail() command, and your costumer gets the whole text on 1 single
line?

I'm using $newtext = wordwrap( $text,76,\r\n );

He has Outlook. When I'm testing it in my Eudora, in Bat and in
Outlook Express, it's wrapped nicely.

(So far the headers end with \n and not with \r\n - may this
have an influence on the resulting email body? I cannot run 33
tests, because the only one who can test it for me is the
customer...)

TIA

Mike


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




[PHP] wordwrap doesn't work for customer's Outlook

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

This is really frustrating:

We found two versions of Outlook on different machines, that
have been installed with the default settings, that 'eat' the
line breaks which were made with PHP's wordwrap() function.
There are no line breaks at all!

On one of the machines there's also a version of Outlook Express,
and this one shows the line breaks. Also in Eudora and in Bat,
the line breaks are ok.

Important detail, the footer of the newsletter is hardcoded in
the PHP script with physical line breaks like

 \n .
 \n .
 Copyright?\n .
 --\n .

These work!

So can anyone tell me what is the difference between wordwrap and
these hard-coded lines? Is wordwrap not safe for use in newsletter
sending scripts? Why is $newtext = wordwrap( $text,76,\r\n );
not sufficient?

Thanks a lot



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




[PHP] newsletter wordwrapping for Outlook?

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

Hello

I'm wrapping a newsletter with

$message = wordwrap( $message1,75,\r\n );

before sending it out.



still, my customer with his Outlook client gets everything on one line!

(Eudora and Outlook Express on my own machine display it fine.)

Any takes?



Thank you.




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




Re: [PHP] newsletter wordwrapping for Outlook?

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

Everything ok. Like often, in the minute I sent my posting, I got a message
from the customer that it looks great now.

This list seems to help metaphysically:)

Have a nice day.

Mike

At 11:00 28.05.02, you wrote:
Hello

I'm wrapping a newsletter with

$message = wordwrap( $message1,75,\r\n );

before sending it out.



still, my customer with his Outlook client gets everything on one line!

(Eudora and Outlook Express on my own machine display it fine.)



-- 
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 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-24 Thread m u i n a r

At 08:44 24.05.02, you wrote:
I used:

   img src='cid:piccy.jpg

Which I think was what you had as well.

Then in the mime parts:

   Content-Type: image/jpeg; name=piccy.jpg
   Content-Transfer-Encoding: base64
   Content-ID: piccy.jpg
   Content-Disposition: inline; filename=piccy.jpg

Thanks! That's quite what I have, but the images are attached below the 
message,
and the images in the message itself are broken   :(

Here's some code: I'm reading the message into the variable $html_body...

 $html_body =
 This is a multi-part message in MIME format.\n
  . --$boundary\n
  . Content-Type: text/html; charset=\iso-8859-1\\n
  . Content-Transfer-Encoding:8bit\n
  . \n
  . 
Then comes the html part, the picture embedded as follows...

img src=\cid:01.jpg\; width=\600\ height=\75\/td

... 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-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] deleteing a file from server

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

At 13:34 24.05.02, you wrote:
I use the copy function to copy a file to the server, like this;
copy($file, ./jpg/$name.jpg);

what would I do to removeit from the server, or delete it?


 if( file_exists( $dirName/$file ) )
 {
 unlink( $dirName/$file );
 }

HTH

Mike



-- 
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

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




[PHP] mail() with images *embedded*

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

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?

(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 img src=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?

Thanks a lot

Mike



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