"Those who do not want to imitate anything, produce nothing." - Salvador Dali

Solutions for a tempermental Gmail
Jan2009

Tags: , , , , | No Comments

In the last few months, I’ve been experiencing outages in Google’s Gmail service. While still in beta, many people have come to rely on Gmail as their primary mail provider, without considering the consequences if Gmail should ever misplace or prevent access to an account.

Backup your mail!

Users should therefore have a Gmail backup plan in place. There are a number of tools that can do this for you. However, it’s pretty easy to setup on your own, without any third-party tools. If you use Gmail’s web interface, you should go into your Settings > Forwarding and setup automatic forwarding of your email to another account. If you use a desktop application like Thunderbird or Outlook to download your mail via POP, then you should already have the mail backed up to your computer.

iPhone SMTP backup?

I recently ran into a problem with Gmail on my iPhone Mail application. When trying to send an email, I was getting a “Sender address was invalid” error. After trying a number of different avenues for resolving this problem, I came up with the following solution. The goal is to add an additional outgoing mail server (SMTP) option to the iPhone. However, this cannot be done properly on the iPhone itself, and requires proceeding through the iTunes desktop interface:

This tutorial assumes that: [1]  

  1. An SMTP server has been setup for you somewhere (i.e. with your own hosting provider or ISP. If you have Bell or Rogers Internet, they should have provided you with SMTP info).
  2. The SMTP (and POP/IMAP) account has been setup in Outlook or Apple Mail. Thunderbird might work, though I haven’t tried that application here.
  3. You have jailbroken your iPhone and know how to SSH into your iPhone.

Once you’ve met the above requirements, here is how to setup an additional, failover outgoing SMTP option on the iPhone. If your outgoing Gmail server isn’t working, the iPhone will seamlessly try the additional SMTP option instead:

  1. SSH or winSCP into you iPhone and go to /var/mobile/Library
  2. Change the permissions of the Mail directory: at the command line, chmod -R 777 Mail/ (or if using winSCP, right-click the Mail directory, and change its Properties to 777 and make it do that recursively)
  3. In iTunes, go to iPhone > Info > Mail Accounts and check the box, and then check the mail account you want to sync (it will only sync the settings).
  4. Sync your iPhone

Now you should have another mail account on your iPhone. I didn’t want to have two separate mail accounts on my iPhone because that’s just more of a headache. I only wanted a non-gmail SMTP server so that I could stop getting the “Sender address was invalid” type of errors yet still have the mail sent. Therefore, I performed the following steps:

  1. On the iPhone, went to Settings > Mail, Contacts, Calendars, and tapped my NEW mail account.
  2. Delete that NEW mail account.
  3. Then, still on the iPhone, go to your Gmail account in the iPhone’s Mail app and tap the SMTP under Outgoing Mail Server
  4. You’ll see the NEW SMTP server is still there. Tap on it and then enter the proper information (username and password). Also make sure this server is switched to ON.

Now, when Gmail mail server is not functioning correctly, your iPhone will try sending the email through a secondary SMTP server. Since the username on this secondary SMTP
server is also an email address, I also made it an email forwarding address so that emails sent to it are forwarded to my gmail address.

Of course, the best remedy would be for Gmail to always work using their own failsafe systems. But since the service is still, and will probably remain indefinitely, in beta, we’ll have to come up with our own solutions for now.

  1. This tutorial should also work for anyone having problems with their primary mail provider, be it Gmail, Yahoo or something else. []


Leave a Reply