attach and send from the web?
June 8, 2006 8:08 AM
Subscribe
Web development question: sending emails from a site with file attachments, can it be done?
Our customer wants us to build a web page that offers several pdf files for download, they also want to initiate the creation of an email message. Both of those things are pretty easy to do, but combining these tasks is proving to be problematic.
Essentially the user should be able to select any combination of documents, then click a button that creates an email with the selected document files attached.
Can this be done? I've tried looking for solutions on the web, but I can't find this particular issue. We are using ASP, but as you can tell, we aren't exactly experts with this...
posted by lilboo to computers & internet (9 comments total)
As far as the format of the email message you need boundary separators (unique strings of text that say something like boundary="__nextpart_234wd") in the message to separate the message body from the encoded attachment sections.
Email yourself a test message from your own email client with two very small images attachmented then after recieving that email look at the raw text of the message and you'll see how the mime boundary separators are labeled and how the base64 encoding is placed in the message body. Use that email as a template for your own email sending application.
posted by StarForce5 at 8:21 AM on June 8, 2006