email after upload

All others add-ons (Secure FTP, SCP, Flickr, scripts ...).
Post Reply
Khalil Karamy
Posts: 1
Joined: Thu Jan 29, 2009 4:37 pm

email after upload

Post by Khalil Karamy »

I juste know how it does possible to send email to "%email" after upload was completed ?
I heard that you have php script which could make job ?

Thnks for you help

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: email after upload

Post by support »

You need to use "forward" parameter such as:
<PARAM NAME="forward" VALUE="http://server.com/email.php">
Then the applet will call email.php after successful upload.

Here is a sample of email.php:

Code: Select all

<?php
  $email_sent = "NOT SENT";
  $email = "your.recipient@domain.com";
  $headers = 'From: sender@server.com' . "\r\n";
  $headers.= 'Reply-To: noreply@server.com' . "\r\n";
  $to = $email;
  $subject = 'Your email subject';
  $message = '
  Hi,
  This email is a confirmation report for upload:
  Best regards.

  ';
  $ret = mail($to, $subject, $message, $headers);
  if ($ret == TRUE) $email_sent = "SENT";
?>

Post Reply