We've been asked by a few of our web hosting customers how to get push notifications of new emails on their iPhone, the steps below make use of
Z-Push which is a free open source script.
Step 1 Install Z-Push on your web space
You will need to upload Z-Push to the web space of the domain that you wish to receive push notifications for new emails for.
The quick method works for hosts that run PHP via suPHP such as
TOLRA and
AtlanticHosting.net, if your host doesn't use suPHP or you want to use a newer version of Z-Push then please follow the long method.
The Quick Method- Download the attached ZIP file
- Unpack the ZIP file to your PC
- Using FTP upload the z-push folder to your public_html folder in your web hosting account
- Edit or create .htaccess file and add:
Code:
RewriteEngine On
RewriteRule ^Microsoft-Server-ActiveSync$ z-push/index.php
- That's the server setup all done, so move to step 2 configuring your iPhone
The Long Method- Download the latest version of Z-Push
- Unpack the archive to your PC
- Edit config.php and replace:
PHP Code:
$BACKEND_PROVIDER = "BackendICS";
With:
PHP Code:
$BACKEND_PROVIDER = "BackendIMAP";
- If your host uses mod_php then you can skip this step. Edit index.php and replace the following line:
PHP Code:
$requestheaders = apache_request_headers();
With:
PHP Code:
function getHeaders() {
$headers = array();
foreach ($_SERVER as $k => $v) {
if (substr($k, 0, 5) == "HTTP_") {
$k = str_replace('_', ' ', substr($k, 5));
$k = str_replace(' ', '-', ucwords(strtolower($k)));
$headers[$k] = $v;
}
}
return $headers;
}
$requestheaders = getHeaders();
- Using FTP upload the z-push folder to your public_html folder in your web hosting account
- Ensure the folder z-push/state is writeable by the webserver
- Edit or create .htaccess file and add:
Code:
RewriteEngine On
RewriteRule ^Microsoft-Server-ActiveSync$ z-push/index.php
- That's the server setup all done, so move to step 2 configuring your iPhone
Step 2 Setting up the email account on your iPhone
- Click Settings
- Select Mail, Contacts, Calendars
- Add Account and select Microsoft Exchange
- Enter your email address in the Email field
- Enter your username for your email account in the Username field, this most probably is your email address
- Enter the password for your email account in the Password field
- Optionally set a description for the account in the Description field
- Click Next
- When the Server field appears enter your domain where you uploaded Z-Push to e.g. www.yourdomain.com and click Next
- If you are using a domain which does not have an SSL certificate then you need to click Ok to the unable to verify account information message that appears
- Click Save
- If you are promoted to Save or Edit choose Save
- Make sure Mail slider is on and both Contacts and Calendars are off before you click Save
- If the domain you installed Z-Push onto doesn't support SSL (https) then:
- Click on the account you just added
- Click Account Info
- Change Use SSL to Off
- Click Done
- Click Mail
- Check the Fetch New Data field is set to Push if not click it and set push to On, then click Mail
- Click Settings
- Press the Home button to quit settings
At this point if all has gone well you can view your mailboxes in the Mail app and when a new email arrives your phone will notify you.
If any of our web hosting clients need help installing this on their domain then please raise a
web hosting support ticket stating the domain you require it be installed on and we'll gladly do it for you.
Please note we can't support issues with Z-Push itself for those you will need to consult their
forum.