[wdvltalk] Re: mailto with attachment?
- 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: (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: 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.
[wdvltalk] Re: mailto with attachment?
Thanks for the tip...I'll let you know. steve On Apr 26, 2004, at 2:33 AM, 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: ( 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: 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.unsub%% 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. • 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.
[wdvltalk] Re: mailto with attachment?
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: (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.
[wdvltalk] Re: mailto with attachment?
Hi Sheila. So far, I have been able to mime-encode the file, but it shows up in the body and not as an attached file (so you are right-on about your header comment). Size does not seem to be limited to 255 chars when attached as mailto:?body=$file. Since I am a real novice in email stuff, could you steer me a little on how/where I add which headers? thanks, steve 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. 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?) 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.
[wdvltalk] Re: mailto with attachment?
steve miller wrote: Hi Sheila. So far, I have been able to mime-encode the file, but it shows up in the body and not as an attached file (so you are right-on about your header comment). Size does not seem to be limited to 255 chars when attached as mailto:?body=$file. Since I am a real novice in email stuff, could you steer me a little on how/where I add which headers? You can't modify the headers with a mailto. The client's mail program is creating the headers. I think you need to look for another solution, forget mailto. A script on the server or a program on the client's machine will be needed to construct the email. I did a quick search and found this article. http://www.phpbuilder.com/columns/kartic2807.php3 The first couple of pages covers the basics of MIME email, the rest is PHP specific. 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.
[wdvltalk] Re: mailto with attachment?
Wish I could use your advice, but the client has many email lists in his current mailsystem that he has to use, and currently the only way to access them is though his desktop mail client. Unless there is another way, I will have to use a mailto link to launch it...Our only working idea so far is to download the file to his desktop and have him manually attach it. thanks, steve On Apr 26, 2004, at 1:58 PM, Sheila Fenelon wrote: steve miller wrote: Hi Sheila. So far, I have been able to mime-encode the file, but it shows up in the body and not as an attached file (so you are right-on about your header comment). Size does not seem to be limited to 255 chars when attached as mailto:?body=$file. Since I am a real novice in email stuff, could you steer me a little on how/where I add which headers? You can't modify the headers with a mailto. The client's mail program is creating the headers. I think you need to look for another solution, forget mailto. A script on the server or a program on the client's machine will be needed to construct the email. I did a quick search and found this article. http://www.phpbuilder.com/columns/kartic2807.php3 The first couple of pages covers the basics of MIME email, the rest is PHP specific. 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.
[wdvltalk] Re: mailto with attachment?
- Original Message - From: "Sheila Fenelon" > > As Sheila says, normally this is all done for you by the > > email client but you can duplicate the process manually > > *if* you understand how it's done - I know because I > > have made it work some time back - would send you > > a code example if I was at home and could access my > > files! > I'd like to see this code when you have a chance. Sending it off list. 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.