attachment links in text emails vs Windows IE

Discuss, research, share, find, and solve bugs

attachment links in text emails vs Windows IE

Postby ekroeker » 10:32pm, Mon 02 Jan, 2006

Here's the scenario (and this had to be my first attachment to my user community!):

-- attach a PDF file to a message. Send message to list.
-- (all users currently receive text format only, by my config choice while I gradually expand phpList usage)
-- users receive message correctly, with link at the bottom for the attachment
-- users with Windows Internet Explorer click on link, but end up with File Not Found errors from Adobe or IE, depending upon their email client where they did the initial click.

This is not a problem with any browser on Macintosh (including IE), not a problem with Mozilla on Linux, and not a problem on Windows if an alternative browser such as Firefox is in use as default. All the cases that work download the PDF file, then display it in Adobe Reader (or xpdf, in the Linux case).

(the link in the message is the dl.php?id=xxx form, where xxx is the phpList internal attachment identifier presumably).

Any suggestions? Unfortunately, the case that fails is exactly the most common configuration in the user community. The solutions I have to publish to my users now have three distinctly different cases (using IE with a web mail interface, using IE with Outlook, and using IE with Outlook Express). It's real messy to guide the user through a manual file save for the attachment link.

Things I need to test yet:
-- forcing HTML only reception and HTML format with a test list
-- trying attachments other than pre-made PDF files to see symptoms


SO, my question to the forum is: Can I make this recipient problem go away with some configuration setting on the phpList end?

(I fear the solution is having the ability to have attachments really added to each outgoing text email, which doesn't seem to be a phpList capability for text emails).
ekroeker
phpLister
 
Posts: 7
Joined: 10:13pm, Mon 02 Jan, 2006

I am having the same problems too

Postby goddy » 12:08am, Fri 20 Jan, 2006

:( I also have had the same problems too...but I have tried a number of files from .doc to pdf plus others . The only one which seems to be ok is a jpg photo....did you manage to solve it
goddy
phpList newbie
 
Posts: 1
Joined: 12:02am, Fri 20 Jan, 2006

Postby thoraxe » 11:27pm, Mon 03 Apr, 2006

I'm having this same problem. Maybe if the link was directly to the file instead of to a PHP reference to the file, it might work better.

Honestly, I'd just prefer that phplist send the attachment with the email regardless of whether or not it is plaintext or HTML. Is there an easy way to do this?
thoraxe
phpLister
 
Posts: 12
Joined: 6:39am, Tue 24 Jan, 2006

IE cannot download dl.php?id={whatever} from {website}

Postby vscheer » 8:04pm, Sat 23 Sep, 2006

With my first try at sending an email with a PDF attachment, I find that IE displays the error in subject line. I've looked around and believe it has something to do with the way IE caches files. Most of this is above my head, but really would like to find a solution that I can understand. Has anyone solved this problem?
Veronica
vscheer
phpLister
 
Posts: 6
Joined: 2:02pm, Fri 07 Oct, 2005

Postby tripper54 » 12:14am, Tue 16 Jan, 2007

This sounds to me like a bug in the php download script. I've not looked at the code, but I have had a lot of grief with getting php/asp powered downloads working robustly across browsers on other projects.

As a workaround, why not simply:

1) Upload your PDF to a web server.
2) In your email, place a link to the uploaded PDF.

Simple and sweet. I guess you would lose some tracking functionality, but you could still get an idea of number of downloads through your web server logs.

HTH
tripper54
PL Nut
 
Posts: 32
Joined: 4:14am, Wed 29 Nov, 2006
Location: East Coast of Australia

Postby mdbasco » 12:26am, Wed 07 Feb, 2007

I don't know if this is the best way to handle this (I'm pretty sure it isn't); however, I simply inserted the line

header('Cache-Control:');

into dl.php

This overwrites the

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0

that was being inserted (a default?) by the server.

Now the header just comes back as

Cache-Control:

and IE now handles it correctly.


Please let me know if this helps.

Mark
mdbasco
phpList newbie
 
Posts: 1
Joined: 12:25am, Wed 07 Feb, 2007

Postby GeorgeOnLine » 9:38am, Tue 20 Feb, 2007

mdbasco wrote:I simply inserted the line

header('Cache-Control:');

into dl.php

This overwrites the

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0


Sorry, this point is not clear to me. Where should be this line?
Code: Select all
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
I can't find it on my dl.php...
GeorgeOnLine
phpList newbie
 
Posts: 2
Joined: 12:15am, Sun 11 Feb, 2007

Postby borealis » 12:50am, Tue 01 May, 2007

It looks like MDBASCO gets the Brass Ring!
Until now, I had been going round and round with this problem.

This is how I applied the fix with phpList v2-10-4...

Opened file dl.php
At approximately line 54 I found:
header ('Content-Disposition: attachment; filename="'.basename($data[2]).'"');

Immediately after that I added the:
header('Cache-Control:');

So it now looks like:
header ('Content-Disposition: attachment; filename="'.basename($data[2]).'"');
header('Cache-Control:');

Saved it. On the server I renamed the default dl.php to dl_default.php (ya know, just in case) then uploaded the modified file.

Logged in. Created message with attachment. Sent message to my testing list and wonder of wonders it freakin works in IE (Hotmail & AOL), IE with Outlook, IE with Eudora.
I'm a happy developer now!
Oh, yeah I still have to send my all important client a test message, but I'm optimistic now.

Give it a shot!
borealis
phpList newbie
 
Posts: 2
Joined: 11:26am, Tue 12 Sep, 2006

Postby miniprint » 6:02pm, Wed 28 May, 2008

Thanks a lot!

It really helps a poor old German to solve his problem.

I wonder why this solution is still not part of the latest version. I am wondering too, why I still did not fin the possibility to place real attachments in text-Mails. I think many people would like this option.

I hope developers are reading this forum
miniprint
phpLister
 
Posts: 6
Joined: 9:41am, Wed 28 May, 2008

Postby openmtl » 7:21pm, Sun 01 Feb, 2009

I just started using phplist and hit this problem with IE 7 not downloading right (obviously Firefox works OK !).

The browser never really properly prompts the user as to what to do with the file but just says that it can't connect to the server even though it is connecting.

I used Wireshark to see what a good download from e.g. Joomla! remository, looked like and changed the header in dl.php until I got it to go.

When I added in....

header ('Cache-Control: private');

around like 58 in dl.php then it started to work OK.

In the end I have...

Code: Select all
  header ('Accept-Ranges: bytes');
  header ('Content-Description: File Transfer');
  header ('Cache-Control: private');


just before the oroginal dl.php code of...
list($fname,$ext) = explode(".",basename($data[2]));
header ('Content-Disposition: attachment; filename="'.basename($data[2]).'"');

and then I added...

Code: Select all
  header ('Content-Transfer-Encoding: binary');


Note that this is very much voodoo debugging i.e. altering dl.php to look like what a Joomla module does BUT given that I copied the well known Joomla remository module which specialises in downloading files I felt that what it put into the headers was a good bet.

What is the issue with making this kind of fix permanent in dl.php ?
openmtl
phpList newbie
 
Posts: 2
Joined: 7:03am, Fri 30 Jan, 2009


Return to Bug Discussion

Who is online

Users browsing this forum: No registered users and 1 guest