Email your repository

What modern information handling system do we probably interact with most each day? For the majority of us, it is probably our email. We send and recive dozens of emails each day. So how about enabling repository deposit via email?

It has certainly been talked about from time to time, and a plugin to the Thunderbird email client has even been written that allows you to deposit attachments into repositories using SWORD (no mention is made of metadata). This plugin should work with any SWORD enabled repository, but only works with one email client. Wouldn’t it be great if there was a more general solution that worked with all repositories, and all email clients?

Now there is! The latest version of the SWORD PHP library (version 0.8) contains an example script showing SWORD and the PHP library in use. To make it work, just fill out a configuration file with your email address, password and IMAP mailbox details, and your repository login, password and deposit URL. After the configuration file has been filled in, all you need to do is run the script ‘imap-mail.php’ on the command line. The script will connect to your mailbox and look at each unread message. It will package each one up and deposit it into the repository.

How does it work?

It uses the standard PHP IMAP library to connect to your inbox. For each unread message it finds, it extracts the name of the sender of the email, the email subject, and the body of the message. It uses these for metadata:

Along with the metadata, the script adds each email attachment to the deposited item. An example of an email deposited this way can be seen at: http://dspace.swordapp.org/jspui/handle/123456789/318

If you want to try it out, but don’t want to set it all up, for a limited time I’ll leave it running against the deposit@swordapp.org mailbox. Send an email to deposit@swordapp.org and when I periodically run the script, your email will be deposited into the test DSpace/SWORD repository at http://dspace.swordapp.org/. Please bear in mind that the repository is open access to the world, so anyone can see what your email and optional attachments contain! (Please consider working hours / timezones etc when working out when I am likely to next run the script! You will receive a confirmation email when your deposit has taken place.)

A few further thoughts:

If I get time, my next extension to the PHP SWORD library will be a basic web client (similar to http://client.swordapp.org/ except written in PHP, and will create packages from files for you). If you have any other suggestions, please leave a comment!

Bookmark and Share
Posted on July 28, 2009 at 8:19 pm by Stuart · Permalink
In: Uncategorized · Tagged with: , ,

2 Responses

Subscribe to comments via RSS

  1. Written by Mahendra Mahey
    on October 9, 2009 at 2:12 am
    Permalink

    My colleague Emma Tonkin,Mark Dewey and myself did something similar for OR09 in May 2009, creating a Thunderbird plugin, depositing stuff to a repository using SWORD, see:

    http://www.vimeo.com/4733141

  2. Written by Mahendra Mahey
    on October 9, 2009 at 2:35 am
    Permalink

    Sorry Stuart, noticed you referenced us at the beginning.

Subscribe to comments via RSS

Leave a Reply