Checkbox to Email Creation with Attachment
As you can see by the markup below, there is an image, which has a checkbox next to it. There are about 15 different documents laid out on this particular page. My goal here is to have the end user check off all the appropriate documents and then click a button that says, ‘Generate Email’ (or something along those lines). This is part of an internal application. Everybody’s native email client is MS Outlook. When the ‘Generate Email’ button is clicked, an email will open up and have the checked off documents attached to the email. The user enters an email address, and hit send.
I am sure this is possible, but I’m just not sure if JS is the best thing, or a server script like PHP. That’s why I’m posting it here. Your assistance is greatly appreciated.
<div class="col one_fourth gallery_box"> <a href="images/docs/POP_Form.jpg" rel="lightbox[docs]"><img src="images/docs/POP_Form.jpg" alt="" width="74" height="95" class="image_frame"/></a>
<h5>Student Payment Option </h5>
<h5>Policy Agreement (POP Form) </h5>
<h5><font color="#990000"><a href="docs/POP Form.pdf" target="_blank"><strong>Click here for the PDF</strong></a></font></h5>
<h5> <span id="sprycheckbox3">
<input type="checkbox" name="pop_form" id="pop_form" tabindex="40" />
<label for="pop_form">Send this form in an email</label>
<span class="checkboxRequiredMsg">Please make a selection.</span></span></h5>
You can cause their Email client to open with HTML and even preset some fields, but you can't add attachments. You'll want a server-based script to do that job, whether its written in PHP or other language.
Do you know PHP? I know a little, but being a programming language and not a markup language, I’m not very good with it at all. Can you get me started on a script for that? Or do you have something that already does what I’m trying to do that I can turn into my own?
Yes, I know PHP. If you have some experience with programming, I would suggest that you find a formmail script in one of the online scripts directories that can send attachments and modify it to suit your needs. A formmail script normally sends a file uploaded by a user as an attachment, so all you'd have to do would be to change it so that it would send the files which already reside on your server that the user selects with your form. It should be easy to do, and there's only one potential problem I can see. Some mail servers have limits on the size of Emails. It sounds like you have an in-house project, so this might not be an issue for you. But if it is, you will need to limit the number of selections or configure the script to send separate Emails for each selected file. Good luck!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)