How To Remotely Trigger A Torrent Download Via Email [Mac]

Jackson Chung 31-12-2009

How To Remotely Trigger A Torrent Download Via Email [Mac] launch transmissionFor a long time now, I’ve been searching for a way to start a torrent download from a remote location. And since I’m on the road most of the day, Transmission’s WebUI isn’t any good to me. I couldn’t be bothered to set it up anyway, it would involve having a fixed IP address or DynDNS — too much hassle to being with. What I actually needed was a simple way to download a torrent on my iPhone and send it to my Mac running at home.


When I realised that the iPhone didn’t support downloading files natively, I was back to square one. Then I thought of using Dropbox — but that didn’t work. After a couple of hours of research, I finally found a solution, albeit a pretty rudimentary one. It involves a secondary email, Mail rules, Transmission or uTorrent and Applescript. Now, let’s be clear on this: I’m not a scripting geek. I’m just an average Mac user. But the fact that I actually wrote this script is a clear testament to how easy it is to learn the Applescript language. I digressed.

Here’s how I managed to set up Mail and Transmission to automatically download torrents sent via email.

First of all, we need to write the script. But since this is MakeUseOf, I’ve already written it for you. Download the appropriate version depending on which torrent client you use.

Download Applescript: Transmission via email

Download Applescript: uTorrent via email

Unzip the file and store the script somewhere safe, for example within the scripts folder located at /Library/Scripts/.


If you prefer to compile the script yourself, here’s how it looks like:

(*Transmission via email by Jackson Chung*)

using terms from application “Mail”
on perform mail action with messages theMessages for rule Torrent
tell application “Mail”
repeat with theMessage in theMessages
set theText to content of theMessage
set the clipboard to (theText)
end repeat
end tell

tell application “Transmission” to activate
tell application “System Events”
tell process “Transmission”
keystroke “u” using {command down}

keystroke (theText)
key code 36
end tell

end tell
end perform mail action with messages
end using terms from

Before we proceed, let me explain that we are going to set a rule to detect torrents sent from a primary email to a secondary email. So in this case, you’ll need to 2 separate email accounts.

Now launch Mail (assuming you inherently use Mail; if not, you’re out of luck) and enter its Preferences. Click on the Rules tab and add a new rule. Name it “Torrent“, then set the condition to “all”, as in “If all of the following conditions are met”. Next, set the rule conditions as you see in the screenshot below:

How To Remotely Trigger A Torrent Download Via Email [Mac] mail rule


From – is equal to –
Subject – is equal to – Download torrent

Perform the following actions:

Mark as Read
Run Applescript – Click the choose button and locate the Applescript you’ve just downloaded

Click on OK and click on “Don’t Apply” if asked Do you want to apply your rules to messages in selected mailboxes?

Mail is now set. For every email from with the subject “Download torrent”, it will trigger the Applescript. Perfect, just what we want.

Now, let’s set Transmission. Enter its Preferences and check the box for “Start transfers when added” and make sure to uncheck “Display “adding transfer” options window”. We want Transmission to automatically start torrents without intervention. OK, Transmission is now set as well.


How To Remotely Trigger A Torrent Download Via Email [Mac] transmission settings

uTorrent’s default settings will do just fine.

Now then comes the interesting part. How do we format the email? It’s pretty simple. The Applescript is set to copy the content of the message so all you need to add is the URL to the torrent. Remove your email signature or it won’t work. From my iPhone, all I do is hold down on a link until the contextual menu appears. I tap on Copy and launch Mail on my iPhone.

How To Remotely Trigger A Torrent Download Via Email [Mac] IMG 0739


Select the appropriate mailbox corresponding to and compose a new message to your secondary email account Enter the subject line: Download torrent — remember that’s one of the triggers.

Then paste the torrent URL into the content of the message and remove everything else i.e. signatures, etc. Click Send and watch the magic happen.

How To Remotely Trigger A Torrent Download Via Email [Mac] IMG 0740

As soon as your Mac receives the email, it will:

    *Mark it as read;
    *Start the Applescript which then;
    *Launches Transmission or uTorrent;
    *Opens a torrent location from a URL;
    *Enters the URL into the field and clicks OK;
    *Starts downloading the torrent.

Since all of the magic happens from within your Mac, it doesn’t really matter how you send the email. Happily, you can do this from any mobile phone with internet connectivity, or from a browser. I hope you’ll find this “hack” useful.

This is my last post of the year before I take a short break from writing. I wish all MakeUseOf readers a Happy New Year!

Related topics: Apple Mail, Applescript, BitTorrent, Programming.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Daniel
    March 2, 2010 at 7:07 pm

    I have an easier way for you all

    All you need is dropbox and tramission.

    In your Tramission setup select your dropbox folder as the folder tranmission watches for torrents.

    Then simply use the dropbox web interface to drop torrents into your dropbox folder. Transmission will automatically start the download as soon as the torrent hits the dropbox folder.

    The great thing is all you need is a computer with a browswer to remotely start torrents.

  2. jack
    January 3, 2010 at 4:05 am

    What a great method. I wish you had something similar for pc as I'm looking fir the same thing with my iPhone.

  3. Robert M
    January 1, 2010 at 9:13 am

    I've seen tutorials (heh, maybe on this site) where people trigger torrents by having two devices sharing a folder via Dropbox.

    You simple make a new folder in the dropbox folder, name it torrents, and tell your uTorrent client to automatically load torrents from that folder. So when you're away, all you have to do with your laptop/mobile device is save torrents to that folder.

    • Jackson Chung
      January 2, 2010 at 4:02 am

      Yup, you could make Transmission monitor a folder provided you can download the torrent, which you can't do with the iPhone. Hence this method.

  4. Andrew Littler
    January 1, 2010 at 1:06 am

    I was looking for this kind of thing for AGES, but then I found a very simple way (at least on the Mac) with TweetMyMac ( or [Broken URL Removed]), where you just Tweet a Terminal-esque command for it to send back to your computer

    ie: torrent

    you can even use it to shut down/ log off/ sleep/ record ip/ screenshot/ ichat and Tweet back respective photos

    • Jackson Chung
      January 2, 2010 at 4:03 am

      That would mean that your followers would know what you're downloading or you'd need to create a new Twitter account, wouldn' it?