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

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:

<a href="mailto:address?Body=<?=$body?>">

There's a good article on using all the "extra" bits of mailto: such as
From:, Cc:, Body etc at
http://developer.netscape.com/viewsource/husted_mailto/mailto.html

Do let us know if you get it to work!


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