Android and the Gmail app
Module 2: Setting up your mailbox · Reading time: 9 minutes
Learning objective: After this lesson, you can set up a mailbox in the Gmail app and in other Android apps, and explain why forwarding or fetching into Gmail isn't a good replacement.
Key concepts: Gmail app, "Other" account, Personal (IMAP), Samsung Email, manual configuration, sync frequency, push and fetch, Gmailify, "Fetch mail from other accounts" (POP), forwarding to Gmail, battery and background restrictions
Which app?
On Android you usually use the Gmail app (it comes installed on almost every Android phone), or the mail app from your phone's manufacturer, such as Samsung Email. Thunderbird is also available for Android (formerly K-9 Mail). They all work with IMAP and ask for the same details (lesson 2.1). An Android phone doesn't need a Google account to use your own mailbox: the Gmail app is simply a mail program that can also handle other addresses.
In the Gmail app
- Open the Gmail app and tap your profile photo or initial in the top right.
- Tap Add another account.
- Choose Other. Not Google, not Outlook, Hotmail and Live, not Exchange.
- Enter your email address and tap Manual setup.
- Choose Personal (IMAP).
- Enter the mailbox password and tap Next.
- Incoming server settings: username your full email address, password, server the server name. Security SSL/TLS, port 993 if the app asks for it.
- Outgoing server settings: keep Require sign-in switched on, with your full email address and password. Server the same name. Security STARTTLS with port 587, or SSL/TLS with port 465.
- Choose how often the app should sync and give the account a name.
At step 7, the app sometimes fills in imap.example.com itself, and at step 8 smtp.example.com. Those names often don't exist, or aren't listed in the certificate. Replace them with your provider's server name.
Step 3 is another common source of mistakes. If you choose Exchange, the app tries a Microsoft protocol that an ordinary hosting mailbox doesn't speak. If you choose Outlook, the address is treated as a Microsoft account.
In Samsung Email and other apps
The principle is always the same: add a new account, choose manual setup or Other, choose IMAP, and fill in the details. Two things to watch out for:
- Some apps fill in only the part before the @ as the username. Change it to the full address, for both incoming and outgoing.
- Some apps offer the option Security: SSL/TLS (accept all certificates). Don't choose this. If you do, the app won't check the certificate, and you won't notice if someone intercepts the connection.
Syncing and battery life
A phone wants to save battery power. Because of this, new mail can sometimes arrive later than you expect. There are two methods:
- Push: the app keeps the connection open (IMAP IDLE, lesson 1.3) and the server reports new mail immediately.
- Fetch (polling): the app asks every 15 or 30 minutes whether there's anything new.
Android restricts apps running in the background, especially with battery saving enabled. If mail only arrives once you open the app, check the app's settings (sync frequency) and Android's battery settings to see whether the app is allowed to keep working in the background. This isn't a fault of your mail server.
Better avoided: forwarding or fetching into Gmail
Many people want all their mail in a single Gmail inbox. There are three ways to do this, and we advise against two of them.
Having Gmail fetch mail over the internet ("Fetch mail from other accounts", via POP3). Gmail then collects your mail from your mail server. Google has announced it is discontinuing this, along with Gmailify (the feature that applied Gmail's spam filter and tabs to another account). According to Google's help page, new users can no longer set it up, and existing users can keep it for a while longer; check the help page for the current date. On top of that, it works via POP3, with the drawbacks described in lesson 1.3.
Forwarding to Gmail. Your mail server immediately forwards every email to your Gmail address. This may seem convenient, but:
- the forwarding server isn't listed in the original sender's SPF record, so SPF fails at Gmail (lesson 3.3);
- forwarded spam appears to Gmail to come from your mail server, which lowers that server's reputation and makes Gmail judge your ordinary mail more strictly too;
- mail with a strict DMARC policy can end up in spam or be rejected at Gmail if the DKIM signature breaks along the way;
- if you reply from Gmail, your reply comes from your Gmail address, not from your own domain, unless you also set up a sender with your own SMTP server in Gmail.
Adding the mailbox to the Gmail app. This is the right way to do it. The app fetches mail directly from your mailbox using IMAP, you send via your own server from your own address, and nothing goes through Gmail's servers. In the app you see all your inboxes listed one below the other, or combined in All inboxes.
A company phone or a shared mailbox
If several people use the same address, such as info@example.com, IMAP works well: everyone sees the same folders and which mail has already been read. Just make sure everyone updates to the same password whenever it changes, otherwise the server will block the office's IP address (lesson 1.4). Even better: give everyone their own mailbox and turn info@ into a forward or a shared folder (lesson 3.3).
In practice: Android with a hosting mailbox
For a mailbox with WebOké, in the Gmail app you choose Other, Personal (IMAP), with your domain name or your package's server name, port 993 SSL/TLS, outgoing 587 STARTTLS or 465 SSL/TLS, and your full email address everywhere. With other providers it works similarly; only the server name differs.
Summary
- In the Gmail app you choose Other, Manual setup, Personal (IMAP). Not Exchange or Outlook.
- Replace guessed names like
imap.andsmtp.with your provider's server name. - Never accept "all certificates".
- Fetch-from-other-accounts and Gmailify are being phased out; forwarding to Gmail harms deliverability. It's better to add your mailbox to the app with IMAP.
- Mail arriving late is often down to the phone's battery saving.
Quiz
Exercise
Exercise O2.3: Your mailbox on your phone. The same exercise as in lesson 2.3, but for Android. Set up your mailbox in the Gmail app or another app, complete the checklist and send a test email. Are you currently forwarding your mail to Gmail? If so, describe in a few sentences how you would convert this to an IMAP account in the app.
Exercise O2.3: Your mailbox on your phone
You do this exercise yourself; no one checks it. Tick off what you've done and mark the exercise as done.
All boxes ticked, and the test email is in Sent on the second device. If you forward to Gmail: remove the forwarding (or keep it as a copy) and add your mailbox as an IMAP account to the Gmail app (Other, Personal (IMAP)). Replies then go out from your own address via your own server.
Your ticks and notes only stay in this browser; we don't send them anywhere. If you're signed in, we only save in My courses that you've done the exercise.
Further reading
The steps in these articles apply to WebOké's control panels; with other providers it works similarly.
- DirectAdmin guide 8.5: Android and the Gmail app
- Add mailbox on Android (Gmail app and Samsung Email)
- Forward email to another address (forwarders, catch-all not recommended)
- Google Gmail Help, "Learn about upcoming changes to Gmailify & POP in Gmail": https://support.google.com/mail/answer/16604719
