Results 1 to 9 of 9

Thread: [e_Up] Email Upload module

  1. #1
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default [e_Up] Email Upload module

    This is the support thread for the [e_Up] email upload module.
    http://www.contao.org/en/extension-l...000009.en.html
    Allows secured file uploading to Contao filesystem via email

    Useful if you want to allow someone to upload files to your website, but don't want to make them a BE user/FE member or give them ftp access.

    [attachment=0:cvwbxdzu]eup.jpg[/attachment:cvwbxdzu]



    Basically you set up ONE email mailbox (eg: uploads@example.com) to receive ALL emails.

    Polling the mailbox can be manual (via the Poll button), Contao Periodic Command Scheduled (houly,daily or weekly) or externally crontabbed (by pointing the Cronjob to the system/modules/e_Up/E_UpCron.php file).

    In the backend you'll see Email Uploads in the System section.
    First fill in Settings (button at top) with the mailbox details and a few config parameters (regarding emails to acknowledge upload to the sender/notify a moderator of uploads) .... then the Poll Mailbox button will become visible.
    Poll to test the connection.

    Next create a new Upload Entry. You choose a system folder (unique) and enter a SubjectCode (also unique - eg: abc123).

    The subject code is used by the uploader in the subject line of his email between square brackets [abc123]. The files he just attaches to the email.

    Added security includes restricting file types, filesize, setting start and stop dates for access, and senders whitelist (only emails from a whitelist will be accepted)
    Also you can enable/disable uploading with the "green eye" toggle button.

    When the mailbox is polled, first it will check any emails for the subject code in the subject line, process the ones that pass and delete the rest. The processed ones are then checked against the other settings (whitelist/start date etc) and discarded if they fail.

    Because the subject code and the folder you chose are unique, all attachments that pass the requirements (filesize/filetype) are uploaded to that folder. The processed email is then discarded so that the mailbox is empied after each poll. Polls and sent notification emails are then logged in the System Log.

    External crontab - this will depend on your server, but as a for instance, on hsphere/unix the command is:
    Code:
    30 12 * * * 
    /hsphere/shared/php5/bin/php    /hsphere/local/home/myaccountname/mydomainname/system/modules/e_Up/E_UpCron.php
    which would poll daily at 12.30pm.
    You don't NEED to use an external crontab, you can just set the Contao PCS Cron to hourly/daily/weekly in the settings.

    Cheers, Murray.

  2. #2
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: [e_Up] Email Upload module

    Is this in the repository yet?

  3. #3
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: [e_Up] Email Upload module

    Is this in the repository yet?
    Tis now (all good with Mac/Ipad now :D )

  4. #4
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: [e_Up] Email Upload module

    Here is an error I get:

    Code:
    Warning: stristr(): Empty delimiter in /usr/home/bluebaytrading/public_html/bluebaytrading.co.za/system/modules/e_Up/PollE_UpMailbox.php on line 315
    #0 [internal function]: __error(2, 'stristr(): Empt...', '/usr/home/blueb...', 315, Array)
    #1 /usr/home/bluebaytrading/public_html/bluebaytrading.co.za/system/modules/e_Up/PollE_UpMailbox.php(315): stristr('jpg,jpeg,gif,pn...', '')
    #2 /usr/home/bluebaytrading/public_html/bluebaytrading.co.za/system/modules/backend/Backend.php(241): PollE_UpMailbox->pollTheE_UpMailbox(Object(DC_Table), 'tl_e_Up', Array)
    #3 /usr/home/bluebaytrading/public_html/bluebaytrading.co.za/contao/main.php(120): Backend->getBackendModule('e_Up')
    #4 /usr/home/bluebaytrading/public_html/bluebaytrading.co.za/contao/main.php(230): Main->run()
    I sent an e-mail with a PDF and an Image attached to the message from my Mac using Mail App.
    This is the mailbox poll response:
    Code:
    Successful Mailbox Connection - blog@thyon.com [POP]
    Total Emails In Mailbox [1]
    
    ----------------------------------------------------------
    
    Email Upload to tl_files/content/news - News Upload Folder [ID 1]
    From: john.brand@thyon.com [Wed, 18 Apr 2012 10:32:53 +0200]
    Filetypes [Valid Images Only] - There were No Attachments in the Email

  5. #5
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: [e_Up] Email Upload module

    Updated in repository to get rid of error - but its still not finding the attachments names in your case.

    Strange cause I borrowed a Mac yesterday, sent multiple attachment types, and it found and uploaded them all using Mail.
    Thyon, what OS?
    I'll keep investigating.... :?

    BTW, (if it worked!) it would normally reject the pdf because it is set to "Valid Images Only" rather than "All Upload Types"

  6. #6
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: [e_Up] Email Upload module

    I use OSX Lion 10.7.3. I can send you test e-mails from my Mac. As I said, all Mac Mail attachments are sent as attachment-inline and they all have names, because otherwise how will Mac Mail App know the filenames when you receive them.

  7. #7
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: [e_Up] Email Upload module

    they all have names
    I figured that

    I've put some markers in my script so i can see what is going on, so send to the mailbox I gave you (plus cc to me). You still got the details?
    Several different attachment types would be good.
    [fffff] is Subject code

  8. #8
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: [e_Up] Email Upload module

    I've sent you two messages and they both have zero attachments when processed. I copied you in so you can see the e-mails.

  9. #9
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: [e_Up] Email Upload module

    Cool, I got them.
    I'll have a look tomorrow to see what I can find out from them.

Bookmarks

Posting Permissions

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