Menu

Email Notify When File Uploaded to Site?

Help
S Doherty
2010-02-15
2013-06-03
  • S Doherty

    S Doherty - 2010-02-15

    Is is possible to receive an email notification when someone uploads a file to an upload directory (using the PHP form)?  I realize that emailing the file itself is possible, but need it to go directly to the upload directory. 

     
  • TNTEverett

    TNTEverett - 2010-02-15

    You receive an email for every form entry.  If the entry includes a file upload then the file is uploaded to the files folder. 

     
  • S Doherty

    S Doherty - 2010-02-15

    No email is being received.  Which PHP  file is it contained in?  I thought that I checked all the PHPformgen files for an email just in case it was mispelled.   Thanks

     
  • TNTEverett

    TNTEverett - 2010-02-15

    The process.php file does all the work behind the form.
    If you chose emai lnotification when you created the form the mail() function should be included.  If not you have 2 choices.  1.) Add it in yourself.  2.) Generate a new form. 

     
  • S Doherty

    S Doherty - 2010-02-15

    I will check it now…how can I add it if it is not there?  thanks

     
  • TNTEverett

    TNTEverett - 2010-02-16

    Simple example:
    $message="firstname: ".$_POST."
    lastname: ".$_POST."
    email: ".$_POST."
    ";
    $message = stripslashes($message);
    $email_to="\"contact@url.com;".$_POST."\"";
    mail($email_to,"Form Submitted at your website",$message,"From: phpFormGenerator");

     
  • S Doherty

    S Doherty - 2010-02-16

    thanks..it works

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.