We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16488
    • 8 Posts
    Hi,

    I’m trying to attach a file to an email using eform 1.4.4.6 and its not working for me. The email goes through and no errors appear but when I look at the email there is no attachment.

    All the other details appear in the email, but where attachment appears the first letter of the document that I attached is all that is displayed.

    Here is my code

    <form action="[~[*id*]~]" method="post">
        <input type="hidden" name="formid" value="newJob" enctype="multipart/form-data"/>
    
            <h3>Your personal details</h3>
           <table>
        
            <tr>               
                  <td><label>Title</label></td>
                  <td colspan="3"><select name="title">
    						<option value="Mr">Mr
    						<option value="Mrs">Mrs
    						<option value="Master">Master
    						<option value="Miss">Miss
    					</select> 
    				</td>
            </tr> 
    
           <tr>               
                  <td><label>First Name</label></td>
                  <td> <input class="field" type="text" name="firstname" size="40" eform="First Name:string:1:Your First Name is required" /></td>
            </tr>
    
           <tr>               
                  <td><label>Surname</label></td>
                  <td> <input class="field" type="text" name="surname" size="40" eform="Surname:string:1:Your Surname is required" /></td>
            </tr>
    
           <tr>               
                  <td><label>Residential Address</label></td>
                  <td> <input class="field" type="text" name="address" size="40" eform="Residential Address:string:1:Your Residential Address is required" /></td>
            </tr>
    
              <tr>               
                  <td><label>Postcode</label></td>
                  <td> <input class="field" type="text" name="postcode" size="40" eform="Postcode:string:1:Your Postcode is required" /></td>
                </tr>
    
              <tr>               
                  <td><label>Suburb</label></td>
                  <td> <input class="field" type="text" name="suburb" size="40" eform="Suburb:string:1:Your Suburb is required" /></td>
            </tr>
    
             <tr>               
                  <td><label>State</label></td>
                  <td colspan="3"><select name="state">
    						<option value="QLD">QLD
    						<option value="NSW">NSW
    						<option value="VIC">VIC
    						<option value="SA">SA
    						<option value="NT">NT
    						<option value="WA">WA
    						<option value="TAS">TAS
    						<option value="ACT">ACT
    					</select>
    				</td>
            </tr>
    
      <tr>               
                  <td><label>Phone Number</label></td>
                  <td> <input class="field" type="text" name="phone" size="40" eform="Phone Number:string:1:Your Phone Number is required" /></td>
            </tr>      
    
      <tr>
                  <td><label>Email</label></td>
                  <td><input class="field" type="text" name="email" size="40"  eform="Email Address:email:1" /></td>
            </tr>
           
            
            <tr>
                   <td><label>Attach your Resume</label></td>
                   <td><input  class="field" type="file" name="attachFile" eform="attachFile:file:0:Only upload of text documents are supported: pdf,txt,doc " /></td>
            </tr>
      
            <tr>
                   <td> </td>
                   <td> <input type="submit" name="frmGo" value="Send Job" /> </td>
            </tr>
        </table>
    </form>
    



    <p>Here are the details for <strong>[+subject+]</strong> </p>
    <table>
    	<tr valign="top"><td>Title:</td><td>[+title+]</td></tr>
    	<tr valign="top"><td>First Namel:</td> <td>[+firstname+]</td></tr>
    	<tr valign="top"><td>Surname:</td> <td>[+surname+]</td></tr>
    	<tr valign="top"><td>Residential Address:</td> <td>[+address+]</td></tr>
    	<tr valign="top"><td>Postcode:</td> <td>[+postcode+]</td></tr>
    	<tr valign="top"><td>Suburb:</td> <td>[+suburb+]</td></tr>
            <tr valign="top"><td>State:</td> <td>[+state+]</td></tr>
            <tr valign="top"><td>Phone Number:</td> <td>[+phone+]</td></tr>
            <tr valign="top"><td>Email Address:</td> <td>[+email+]</td></tr>
            <tr valign="top"><td>Attactment:</td> <td>[+attachFile+]</td></tr>
    
    	
    
    </table>
    


    Id be very grateful for any advice on this.
    Thanks
      • 16488
      • 8 Posts
      Oh yeah and my snippet call is

      [!eForm? &formid=`newJob` &subject=`Application for Traineeship at Sherriff Electrical Wholesalers` &tpl=`submit_resumeForm` &report=`submit_resumeFormReport` to =`[email protected]`!] 
        • 16488
        • 8 Posts
        Anyone??? Please...
          • 16488
          • 8 Posts
          Shameless bump undecided
            • 14467
            • 35 Posts
            I havent used eform much but shouldnt the enctype="multipart/form-data" attr be on the form tag?
              • 16488
              • 8 Posts
              Thanks for the reply, I’ve tried putting the enctype="multipart/form-data" in both tags and I’ve still got no joy although instaed of just the first letter of the attachment document appearing I’m now getting the full file name????

              Ims so confused because I’ve even tried just using the example given in the eform documentation and I’m getting the same result huh
                • 14467
                • 35 Posts
                  • 16488
                  • 8 Posts
                  Thanks again for taking the time to try and help but I already have that code in my report, I’ve searched through all the forums and I couldnt find anything that could help me.

                  Could it be something to do with the mail server I’m using that I’m using that doesnt allow attachments for forms??
                    • 14467
                    • 35 Posts
                    I dont know that much about eform but I think some one might be able to help you if you posted eg your modx version, eform version, mailserver etc. If you have access to the logs, go through them to see if there is some error or clue there...
                      • 16488
                      • 8 Posts
                      Thanks anyway, I’m getting access to the logs now to see if I can see anything but if anyone else can help I’m using modx 1.0.2, eform 1.4.4.5 and I’m using smtp mail. Cheers