title: dropzone.js how to send me mail after upload is completed
body: <p>I've added the dropzone.js script to my site and got it working. Now I want to get an email when someone uploads something in this dropzone. I only don't know how to do this in php.</p>
  
  <p>my html:</p>
  
  <pre><code>&lt;form action="dropzone/upload.php" class="dropzone" id="myAwesomeDropzone"&gt;&lt;/form&gt;
  </code></pre>
  
  <p>my upload.php</p>
  
  <pre><code>&lt;?php
  $ds = DIRECTORY_SEPARATOR;
  
  $storeFolder = 'uploads';
  $digits = '';
  
  $amountOfDigits = 4;
  $numbers = range(0,9);
  shuffle($numbers);
  
  for($i = 0;$i &lt; $amountOfDigits;$i++)
     $digits .= $numbers[$i];
  
  if (!empty($_FILES)) {
      $tempFile = $_FILES['file']['tmp_name'];
      $targetPath = dirname( __FILE__ ) . $ds . $storeFolder . $ds;
      $targetFile = $targetPath . time() . '-' . $digits . '-' . $_FILES['file']['name'];
      move_uploaded_file($tempFile,$targetFile);
  }
  ?&gt;
  </code></pre>
  
  <p>The code above sends the files to the folder I want them with a timestamp so no file will ever override an existing file. Only when this is done I want an email so I know someone uploaded a file. How can this be accomplished.</p>
  
  <p>the mailingscript i want to use:</p>
  
  <pre><code>$message = "bunch of html";
  
  $headers = "MIME-Version: 1.0\r\n"; 
  $headers.= "Content-type: text/html; charset=iso-8859-1\r\n"; 
  $headers.= "From: examle &lt;info@example.com&gt;\r\n";
  $subject = "example";
  $to = "me@mydomain.com";
  
  mail($to, $subject, $message, $headers)
  </code></pre>