Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Remotely trigger torrent downloads via email from iPhone Network
I've tried to search the internet for a way to remotely trigger a torrent download from my iPhone, but there wasn't one. So I came up with this solution, which uses two different email accounts (one to send, another to receive), an iPhone, Mail, AppleScript and Transmission.

Note that this was originally published here, but I am the author of the hint. I thought this hint was necessary as the iPhone isn't capable of downloading and attaching torrent files to email messages, as is described in this older hint.

The idea behind this hint is very simple:
  • Copy the URL of the desired torrent.
  • Using a secondary email account, send the torrent link via email to the primary email with a preset Subject which will activate a predefined Mail Rule to launch an AppleScript.
  • The AppleScript will launch Transmission/uTorrent to open that URL and download the file.
What the AppleScript does is copy the URL in the body of the email message, launches Transmission/uTorrent, opens the URL, and starts the download.

Get the script from the original blog post above, or paste it in AppleScript Editor yourself using this code:
(*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
Save the script somewhere safe, like /Library/Scripts or your user's Library/Scripts folder. The next step is to create the Rule in Mail. This is more or less up to you, but here's how I set mine up:
  • From is equal to [secondary@emailaddress.com]
  • Subject is equal to [Download torrent]
  • Perform the following actions: Run AppleScript [location of script]
Don't forget to make sure that all conditions are met.

Transmission needs to be configured so that downloads start automatically, and make sure to uncheck 'Display "adding transfer" options window,' or it won't begin. uTorrent's default settings work fine.

When sending the torrent URL on your iPhone, remove the email signature from the message. The script copies the entire content of the body and pastes it into Transmission's (uTorrent's) 'Open Torrent Address' field.
    •    
  • Currently 2.39 / 5
  You rated: 4 / 5 (18 votes cast)
 
[14,673 views]  

Remotely trigger torrent downloads via email from iPhone | 12 comments | Create New Account
Click here to return to the 'Remotely trigger torrent downloads via email from iPhone' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Remotely trigger torrent downloads via email from iPhone
Authored by: mankoff on Jan 13, '10 08:34:16AM

You could also enable the Transmission web interface. Copy the URL from iPhone Safari (press and hold, then select copy), then go to Transmission, paste, and you're done.

---
http://spacebit.org



[ Reply to This | # ]
Remotely trigger torrent downloads via email from iPhone
Authored by: rossr on Jan 13, '10 10:23:35AM

The original post is a clever trick, but I have to agree with mankoff that using the Transmission web interface on the iPhone is a better solution—provided you have access to your Mac via an IP address.

To compare the two:
  • Method A (original post) requires the use of multiple email accounts, running Mail rules and writing Applescripts
  • Method B (Transmission web interface) requires Transmission running the web interface (in preferences) and access to your Mac via an IP address

Basically, it depends on whether you have access to your Mac via an IP address. If you do, use Method B. If you don't, use method A.

I know this sounds all unicorns and rainbows but it's pretty cool that MacOSXHints posts hints like this because it is a good example of sharing different methods of accomplishing cool stuff on your Mac. :)



[ Reply to This | # ]
Remotely trigger torrent downloads via email from iPhone
Authored by: horhey23 on Jan 13, '10 11:28:28AM

I use the iPhone app iDownload to save files from the web and email them to myself. With a Mail rule, AppleScript and Hazel I have any files with a .torrent extension saved to a specific folder that Hazel watches, and then opens with Transmission.

Alternates could be to open the file with Transmission using AppleScript, or if Transmission is running save to it's "watch" folder (and enable the watched folder in Transmission's prefs). I'm no AppleScript guru, so I used Hazel since I already own it.

My Mail rules are setup so that only messages coming from specific email addresses trigger the rule.

Edited on Jan 13, '10 11:36:14AM by horhey23



[ Reply to This | # ]
Remotely trigger torrent downloads via email from iPhone
Authored by: jacksonchung on Jan 18, '10 12:13:14AM

That's great but this trick doesn't require any additional apps besides the ones that come preinstalled with your Mac :) Plus Hazel isn't free.



[ Reply to This | # ]
Remotely trigger torrent downloads via email from iPhone
Authored by: wallybear on Jan 13, '10 12:36:04PM

Maybe I'm a little dense, but I cannot understand the need of two email accounts.
You could simply send emails to yourself and modify accordingly the first filter rule.



[ Reply to This | # ]
Remotely trigger torrent downloads via email from iPhone
Authored by: mmnw on Jan 13, '10 11:48:26PM

I agree with you. I actually tested it just now, it works fine with just one e-mail account. Just send the mail to yourself and you get going. But perhaps there's some caveats somewhere, but it worked for me.



[ Reply to This | # ]
Remotely trigger torrent downloads via email from iPhone
Authored by: jacksonchung on Jan 18, '10 12:11:29AM

Sometimes Mail doesn't recognise an email sent to and from the same email address; and won't appear in your Inbox.



[ Reply to This | # ]
Remotely trigger torrent downloads via email from iPhone
Authored by: wallybear on Jan 19, '10 02:26:46PM

That's funny, it never happened to me; I regularly send emails to myself (when I need some file from/to my office mac) using the same account, and I always receive that mail correctly.
Did you found what specifically triggers the mail missings?



[ Reply to This | # ]
Remotely trigger torrent downloads via email from iPhone
Authored by: kkozoriz on Jan 13, '10 06:03:58PM

A friend of mine pointed me to this alternative. If you use Dropbox, put the torrent file into your dropbox folder and set Transmission to monitor that folder.

More info here:
http://www.downloadsquad.com/2010/01/11/another-dropbox-trick-start-bittorrent-downloads-remotely/



[ Reply to This | # ]
Remotely trigger torrent downloads via email from iPhone
Authored by: mmnw on Jan 13, '10 11:49:37PM

Yeah, but can you download torrents from your iPhone to your Dropbox?



[ Reply to This | # ]
Remotely trigger torrent downloads via email from iPhone
Authored by: jacksonchung on Jan 18, '10 12:14:22AM

It's impossible.



[ Reply to This | # ]
Remotely trigger torrent downloads via email from iPhone
Authored by: Valber on Apr 06, '10 02:46:53AM

Thanks alot mate! This applescript is much better than The one i have made



[ Reply to This | # ]