Before I start this tutorial, I would like to give full credits to crimsontwo from xSellize forums and joshua.menke from cocoaforge. I merely improve on crimsontwo’s work.
In the thread, Gmail + push on iPhone w/ Prowl on xSellize forums, crimsontwo gave instructions on how to run the Prowl python script on your iphone. The downside to it is that if your iPhone connection change from EDGE to 3G or 3G to Wifi or any vice versa, the script will be disconnected from Gmail. To solve this problem, he recommends you to upload the script to your own web server instead.
You need to have SSH access to your web server as well as Python installed in your web server which is not covered in this tutorial.
So here we go:
prowl_apikey = “your_prowl_api_key”
IMAP_USERNAME = “your_gmail_username”
IMAP_PASSWORD = “your_gmail_password”
nohup python main.py > /dev/null 2>&1 &
This is slick. I was just at the site but I’ll try this. Can you whip something up like this for sending messages to Growl?
I’d like to run it on my linux servers and have various scripts send notifications to Growl, not just Prowl.
Thanks,
Vic
Sorry, I can’t really help you with that as Python is not my main language
Part of the files are good. However, the httplib is outdated and needs an update! Second, try to send yourself a “mime”-image (included in mailsource instead of attached). It will crash! I will try to find better options. Probably by using the https/atom-parsing way to connect to gmail and forward to prowl. Yes, it will be polling from the server but i don’t care.
Cool, will you be sharing the code?
Comments are closed automatically after 30 days.
Users: 10 Guests, 8 Bots