Bj wrote:
----- Original Message ----- From: "steve miller"


I have an application (php/mysql) where we are creating
a pdf file from database content, then we would like to
launch the client's email program to send it (so he can
use his address book which already has all his lists set up).
The only way I know of to get there is by using a "mailto"
link, but I don't know how to attach a file with it. Does
anyone know if this is possible?


Can be done if you can figure it out... because the body of an email can go
in a query string for a mailto: (<a
href="mailto:address?Body=This+is+the+text+of+the+message";>) and so-called
"attachments" are really just encoded into the body of a message using
separators.  Although with a pdf file, it's possible the resultant query
string might exceed whatever limits there are on the size of a query
string... guess you'd have to suck it and see.


I believe the limit on the query string is 255 characters in length. I'm not sure if it's the brower or the server that enforces the limit.


As I say an attachment isn't really 'attached' - because in fact, it's
really MIME-encoded then included in the body of a message using MIME
separators.  If you know how to use php to MIME-encode the PDF file, you can
then construct a variable $body holding the full text of the email including
the attachment all ready to send, then you just urlencode($body) and put in
your page:


There's a bit more to sending a MIME-encoded attrachment. Headers have to be added to the email message, so the receiveing mail agent knows about the attachment. The mail agent on the client handles this automatically when a file is attached but I doubt the simple act of adding a MIME-encoded text to the body would work as expected. You may get the encoded text transmitted but it would need to be 'manually' decoded on the other end. (Anyone remember the good ole days of 'cut here' and uudecode?)


Is it possible to use the browser's 'email this page' or 'email a link' feature to accomplish the task? The only other solution I can think of would be to write something on the client side with access to both the local email address list and the web.

Sheila


____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED]
To set a personal password send an email to [EMAIL PROTECTED] with the words: "set WDVLTALK pw=yourpassword" in the body of the email.
To change subscription settings to the wdvltalk digest version:
http://wdvl.internet.com/WDVL/Forum/#sub


________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.



Reply via email to