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:
- Get Prowl from App Store for US$2.99
- Register your Prowl account at http://prowl.weks.net/register.php
- Once registered, click on Settings Tab
- Under API key, click on Generate API Key Button and note copy down your generated API Key
- Download the required files in a zip, called, Gmail With Push On iPhone Using Prowl
- Using WinZip, extract the zip file which you have downloaded from Step 5
- You should see a folder called gmail_and_prowl
- Open the file main.py using NotePad or WordPad
- 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”
- Replace the text your_prowl_api_key, your_gmail_username and your_gmail_password accordingly and save it
- Using your FTP, upload the folder gmail_and_prowl to your home directory in your webserver
- Login using SSH and browse to the path where you uploaded gmail_and_prowl, for example, /home/username/gmail_and_prowl/
Type this command:
nohup python main.py > /dev/null 2>&1 &
- 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.
- You can now log out from the SSH and send a test email to your Gmail account