Gmail With Push On iPhone Using Prowl And Your Own Webserver

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:

  1. Get Prowl from App Store for US$2.99
  2. Register your Prowl account at
  3. Once registered, click on Settings Tab
  4. Under API key, click on Generate API Key Button and note copy down your generated API Key
  5. Download the required files in a zip, called, Gmail With Push On iPhone Using Prowl
  6. Using WinZip, extract the zip file which you have downloaded from Step 5
  7. You should see a folder called gmail_and_prowl
  8. Open the file using NotePad or WordPad
  9. You should see these lines on line 11 to 13:

    prowl_apikey = “your_prowl_api_key”
    IMAP_USERNAME = “your_gmail_username”
    IMAP_PASSWORD = “your_gmail_password”

  10. Replace the text your_prowl_api_key, your_gmail_username and your_gmail_password accordingly and save it
  11. Using your FTP, upload the folder gmail_and_prowl to your home directory in your webserver
  12. Login using SSH and browse to the path where you uploaded gmail_and_prowl, for example, /home/username/gmail_and_prowl/
  13. Type this command:

    nohup python > /dev/null 2>&1 &

  14. The PID of the process which is executing the script will be displayed. You may want to know that number down, just in case you need to kill the process.
  15. You can now log out from the SSH and send a test email to your Gmail account

You Might Also Be Interested In

  • Pingback: » How-To » Thoughts about Growl for iPhone: GriP, Prowl and push notification of your gmail account()

  • Vic

    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.



  • Lester Chan

    Sorry, I can’t really help you with that as Python is not my main language :(

  • Charlie

    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.

  • Lester Chan

    Cool, will you be sharing the code?

  • Pingback: How-To » Gmail with Push on iPhone Using Prowl: error message from the python script()