Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jan 2010
    Posts
    160
    Thanks
    10
    Thanked 1 Time in 1 Post

    Help with Email Code After Upload

    HI

    We have some software that uploads video footage to our FTP server now we want to send an email confirmation from the server once uploaded. This is where I need some help.

    I need a solution that checks for new uploads and send the email by looking for new .txt files and emails confirmation to the user.

    The data is not stored in a datebase just the .txt file.

    1) File is upload as a .AVI file
    2) Along with the upload it places a .txt file with the same name as the AVI file but contains comma separated information.

    For example test.avi (video file) and test.txt contains this

    kevin,cha,company,p-11111d,c-3344944949,kevin@test.com,19,3,2013,,

    Which is as follows:

    First Name
    Surname
    Company
    Reference
    Reference 1
    Email Address
    Day
    Month
    Year

    How would I go about checking for new .txt files and then sending an email to the person that uploaded it with the above information as well the file location of the AVI file.

    Or better still would be to grab all the text files every few minutes upload the data into a database and send the email.

    Thanks in advance.

    Roy
    Last edited by ROYW1000; 03-19-2013 at 08:44 AM. Reason: Additional Information

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Posts
    454
    Thanks
    0
    Thanked 20 Times in 20 Posts
    Not sure why you would send an email to the person who uploaded the info via ftp, but I believe the answer is in the question.
    check for new .txt files and send an email to the person with the file location...grab all the text files every few minutes upload the data into a database and send the email.
    I would say a cronjob that would run every hour. With the date & time of the last run placed in a db or file. This way you can check for items posted after the last run.
    NO Limits!! DHCreationStation.com
    ------------------------------------------------------------
    Broken items wanted for tinkerin'! PostItNow@BrokenEquipment.com
    Global Complaint Dept.

  • #3
    New Coder
    Join Date
    Jan 2013
    Posts
    71
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Is it necessary to email back when any file is uploaded.I dont think it could be a good idea.Basically it seems it is accessed all the time which is unsecure for your site.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •