This tutorial explains how to setup KMail for Gmail in SMTP mode. You will first enable SMTP support from web Gmail (using browser) and then setup SMTP account on KMail. This article is a pair of the POP3's one. I use KMail version 5.4.1 for this article.
Subscribe to UbuntuBuzz Telegram Channel to get article updates directly.
Why IMAP?
You can read what's the difference between POP and IMAP from here or here. IMAP is most suitable when you have multiple devices (laptop & phone). You can think it's similar to Telegram where you can have different devices but same contents, and deleting data from one device means deleting on all devices.
a. Setup Web Gmail
Use your web browser to login to Gmail > go to Settings > POP/IMAP Settings > enable IMAP > Save Settings.
b. Run KMail Account Wizard
Now run KMail and go to menu Tools > Account Wizard.
1. Enter Email Credentials
Enter your email and password. Make sure "Find provider settings..." options enabled.
2. Select "IMAP" & Press "Add Account"
Using "Find provider" feature gives you two options, IMAP and POP3, then choose IMAP and press Add Account button.
3. Skip Encryptions
For just synchronizing via IMAP, you can skip encryption options.
4. It Finished
Once finished, you can press Finish button.
5. Check Mails
Now press Check Mail button to sync your KMail to your Gmail account so you can read and write emails.
6. Enjoy Mails
KMail will show all mail your Gmail account has. You can write email and send it using KMail now. Enjoy!