#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    2
    Rep Power
    0

    Checkbox to Email Creation with Attachment


    Hi everybody…

    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. All these documents would be pre-loaded onto the server. 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 those checked off documents attached to the email. The user enters an email address, and hits 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.

    I'm fairly new to PHP, but I'm willing to learn what I need to. I just need to be pushed in the right direction.

    Code:
    <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>
    </div>
    I know that a formmail script usually sends a file uploaded by a user, but in this case, I need to change the script to allow the user to select files which already reside on the server.

    Thanks in advance!

    -JPC Solutions
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,343
    Rep Power
    594
    I think what determines which will depend on where the data to be emailed resides. If the documents are on the client then use Javascript to launch the default email application (of course the user then needs to build the body and attach the document(s) manually). If it resides on the server then use PHPMailer to generate the email.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    2
    Rep Power
    0
    Originally Posted by gw1500se
    If it resides on the server then use PHPMailer to generate the email.
    It would reside on a server. Now, I understand the HTML side of things, but I don't know how to get started on creating the PHP script. Every script that I find and try to take apart and make my own, only allows the user to upload a script from their local machine. I don't want that. Here's a picture of what I'm trying to do...

    (this forum won't let me post a URL, and I can't seem to upload an image to give you an idea as to what I'm trying to do. If you could, just follow this and then reply back.)

    jpcsolutions.com/picture_library/documents.png
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,343
    Rep Power
    594
    Try this.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.

IMN logo majestic logo threadwatch logo seochat tools logo