DMXzone App Connect Manual

February 14, 2017
Mail Uploaded Files
Mail Uploaded Files

With this movie we will show you how to send uploaded files to an email, using HTML5 File Upload and DMXzone Mailer.

Step by Step

We created a multi file upload form and we want to allow users to email files to us. For a single file field you can do the same by following the same steps for a single file field (1).

If you are using a multiple file input, make sure that its name ends with two square brackets just like it's shown in this tutorial (2). Create a new server action(3) and add a name to it (4). 

Click globals(1) and import the fields from your form (2-4 and 1-3 of next image).

Right click steps (1). Add setup mailer (2-3).

Select whether you want to use a SMTP server or your server default mail component (1-2).

Right click the setup mailer step (1). Add file upload (2-3).

Select your upload field (1). This is the file input under globals, post (2-3).

Select your upload path (1-3).

Right click the upload step when you're done setting up the upload options (1). Add send mail (2-3).

Setup the subject (1). Setup the attachments by clicking the dynamic data button (2). We'd like to email the uploaded files, so just select the upload step (3-4).

Setup the sender and recipient info. We've already explained you how to set up these in our previous tutorials so we won't show this again. Setup the mail content, if required (1).

Optionally, you can empty the upload folder after the files are emailed. Note, that this requires you to have the file system connector extension installed. So if you don't have this extension or if you don't want to delete files, just skip the following steps in server connect. Right click the send mail step (1). Open the file management menu (2). Add empty folder (3).

Select the path to the folder which has to be emptied after the mail is sent. It's the same folder we selected in the file upload step (1-3). Save your server action(4) and open the app connect panel (5).

Select your form in the app connect tree(1) and change its handler to server connect (2-3).

Select your server action (1-3).

Let's add a form reset for when the mail is sent.

Add a new dynamic event And select the action, to be executed.(1), select server connect (2), on success (3).

Select the action to be executed. Under server connect form, select reset (1-3).

And we are done!

That's how easy it is to upload files and email them using HTML5 File Upload and DMXzone Mailer.