Hi all!

I'm writing a webmail application in PHP and most basic things are working now. However, I've recently run into a problem concerning mail attachments. This is the situation right now:

When the user opens a letter there are links to all attachments. The links looks like this:
http://www.lassoweb.nu/webmail/attachment.php/mailbox=INBOX&msguid=218&part=2

Mailbox is the mailbox name, msguid is the message number and part corresponds to the part of the letter that is an attachment. When the user clicks the link the attachment data is extracted from the message and displayed in the browser (if possible). This works nice, but here comes the problem. Since the document is named 'attachment.php', that's the name that comes up in the save box whenever the user tries to save the file. Iv'e tried setting the Content-Disposition header to tell the browser what to call the attachment, but to no avail. The browser still insists on calling all attachments 'attachment.php'!

I've been trying to figure this out for a couple of days now, but no luck yet. Perhaps someone out there have had the same problem (and solved it)?

I'm thankful for any hints


/Lars 'lasso' Olsson ([EMAIL PROTECTED])


PS. One solution might be to 'trick' the browser by creating a fake URL (like http://www.lassoweb.nu/webmail/void/bob.gif), but in order for this to work I need to tell Apache to send all requests to the 'void' directory to a single PHP file. Anyone knows how to set this up? DS.


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

Reply via email to