Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
11-10-2012, 03:03 PM #1
- Join Date
- Nov 2012
- Thanked 0 Times in 0 Posts
Essentially, I want to have a bunch of document icons on a page. There would be a checkbox next to each document. Check all the appropriate documents one wants to send to someone. Click "Generate Email" and an Outlook (or default mailer) email would be created with said documents attached.
Please note that this site will be maintained on an Intranet, and won't be public. Only employees will have access to it.
Any ideas where I can start?
11-10-2012, 09:19 PM #2
- Join Date
- Jun 2002
- London, England
- Thanked 2,531 Times in 2,509 Posts
This forum is not a free coding service. As a general rule, the people helping out in this forum don't write code for others, but try to help with fixing code that doesn't work. You may perhaps get someone to write this script for you, but you'll be far more likely to get help if you have made a substantial effort and written some code yourself. Then someone here will almost certainly help you correct/improve your work.
You seem to be contemplating using the long-obsolete mailto:. Modern browsers no longer accept mailto: as a form action - they simply open the email program (if any) and ignore the form. If you are going to use a form then use a server-side CGI formmail script as the action - there are several good free ones out there.
Be aware that mailto: does not provide any way to include an attachment.
It is your responsibility to die() if necessary….. - PHP Manual
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
11-10-2012, 10:09 PM #3
- Join Date
- Oct 2012
- Thanked 4 Times in 4 Posts
1. Markup the html to display the image icons, checkboxes and button in a form.
2. Each document should have a unique id value, if the docs are retrieved from a database, which should be set to the value of the doc's checkbox.
3. If the doc's meta data is not stored in a database you can use the doc's file name as the checkbox value.
4. Give all the doc checkboxes the same name so that the selected id's or file names can be sent as an array of values to a server side script (PHP can send email attachments very easily) that will send out the email with attachments.
6. All validation must be done server side using php or your preferred server side language.
Last edited by minder; 11-10-2012 at 10:14 PM.