1. Writing E-mails

KMail is KDE's mail client. It is both full-featured and easy to use. This section focuses on KMail's common features. We encourage you to refer to the integrated help to learn more about its advanced features.

Launch KMail by choosing Surf the InternetRead and Send E-mail Internet+MailKMail from the main menu.

The first time you run KMail, a wizard appears to help you set up the mail account you will use with KMail. You only need to enter some connection data. Press the Next button to validate the information you entered and proceed with the setup.

1.1. Mail Configuration

Figure 2.1. Mail Account Type

Mail Account Type

Select the account type from the proposed list and advance to the next step. Please bear in mind that the POP3 protocol downloads messages to the local computer (they can be kept on the server too), while the IMAP protocol doesn't. Both IMAP and POP3 account setups are the same.

Figure 2.2. Your Personal Data

Your Personal Data

Then you have to provide your account information and fill in your personal data. Note that the name you input in the Real name field is the one that will appear on your outgoing mails.

Figure 2.3. Account Credentials

Account Credentials

Then you must give the account credentials: enter your login and password. Your ISP or system administrator should have provided this information together with your e-mail address.

Figure 2.4. Mail Servers

Mail Servers

You are finally asked to provide mail server parameters. Again, your ISP or system administrator should have provided you with the incoming and outgoing mail server information. Outgoing servers are usually of the smtp.provider.net form. Incoming POP3 servers are usually of the pop.provider.net or pop3.provider.net forms. Incoming IMAP servers are usually of the imap.provider.net form. The mail.provider.net form is also common for both incoming and outgoing mail servers.

1.2. Mail Client Interface

Figure 2.5. KMail Client Interface

KMail Client Interface

Toolbar.  Where the main action buttons lie. See Table 2.1, “KMail's Toolbar Buttons”.

Message List.  Where information (subject, date, sender, etc.) about messages stored in the currently selected folder is displayed.

Message View Panel.  Where the contents of the currently selected message are displayed.

Folder List.  Where all folders are listed. The default folders are inbox(incoming messages), outbox(unsent templates), sent-mail(already sent messages), trash(deleted messages), drafts(draft messages) and templates(templates for writing messages). There is also a special folder named Searches which contains the results of a search for messages.

The following table shows the most important buttons available in KMail's toolbar, their equivalent keyboard shortcuts, and a brief explanation of the functions they provide.

Table 2.1. KMail's Toolbar Buttons

Button Keyboard Shortcut Function
Ctrl+N

Compose a New Message.

Ctrl+L

Get new messages for all defined e-mail accounts. Keep this button pressed to display a list of all defined accounts. Select the one you want to get mail from to retrieve messages only for that account.

R

Reply to the author of the selected message. A message-compose window pops up with some fields already set.

F

Forward (send to a third party) the selected message.

Del

Delete the selected messages. Deleted messages are moved to the Trash folder. You can recover messages moved to the trash folder, but deletion from the Trash folder cannot be undone: be careful!


[Note] Note

Some of those buttons have a little black arrow ( ) at the bottom right corner. An additional menu with related actions can be displayed by pressing the mouse button a little longer.

1.3. Composing a Message

Figure 2.6. The Message-Compose Window

The Message-Compose Window

Toolbar.  This is where the main message composition buttons reside. See Table 2.2, “ Message-Composition Toolbar Buttons”.

Message Body.  The area where you type the content of your message.

Message Recipients.  The list of all recipients of this message. The following options are shown:

  • To: the principal intended recipient of this message.

  • CC(Carbon Copy): not-hidden secondary intended recipient(s) of this message. All recipients have access to the mail addresses to which this message is sent.

  • BCC(Blind Carbon Copy): these recipients are also secondary but are hidden from the other recipients of this message. No recipients of the message have access to the other mail addresses to which this message is sent.

The following table shows the buttons which are mostly used in the message-composition window, their equivalent keyboard shortcuts, and a brief explanation of the functions they provide.

Table 2.2.  Message-Composition Toolbar Buttons

Button Keyboard Shortcut Function
Ctrl+Enter

Sends the message immediately (your network connection must be active). A copy of the message is kept in the sent-mail folder.

 

Queue the message. The message is saved in the outbox folder and is sent the next time you request mail to be sent ( FileSend Queued Messages).

 

Attach a file to the message. This function is also accessible through the AttachAttach File menu. A standard file dialog pops up. Select the file you want to attach and click on Attach. Repeat for multiple files.


1.4. Folders and Filters

The filter tool is located in the SettingsConfigure Filters menu and can automatically sort mail into different folders according to specified criteria (sender, subject, date, etc.) by using filters.

Let's assume you want to filter incoming messages according to the sender and you have at least one message from that sender in your inbox folder. You want all incoming e-mail from [email protected] to go directly into the SomeUser folder. The first step is to create a new folder to store the messages.

So access the FolderNew Folder menu and give your new folder a meaningful name. Then, select the mbox mailbox format and click on OK to create the folder.

To create the filter, select one of the sender's messages and right click on it. From the contextual menu, select Create FilterFilter on From, select the destination folder ( Filter Actions) and accept that rule by clicking on Apply and OK.

1.5. Cryptography

1.5.1. Using a PGP Key

KMail allows you to use cryptography to encrypt and sign your e-mails, ensuring that your communications are not tampered with.

The easiest way to use encryption with KMail is if you already have a PGP key. If you don't, here's how to proceed:

  1. Open a terminal window ( System+TerminalsKonsole).

  2. Type gpg --gen-key.

  3. You are asked for what type of key you want: choose DSA and ElGamal.

  4. Choose a key size: the default size is 2048 bits, and is enough for today's needs; a key size of 4096 bits is probably extreme.

  5. You can select an expiration date: 0 is for no expiration date.

  6. Enter your user identification which contains your Real Name, then E-mail Address and finally an optional Comment.

  7. Enter a passphrase which should be composed of upper- and lowercase letters, numbers and symbols: you need to enter it twice.

  8. GPG now generates your key. Move your mouse around, surf the Web, play music since it needs a lot of random data.

  9. Finally to make sure everything works, type gpg --list-keys. You should get something similar to this as a result:

    [queen@community
              queen]$ gpg --list-keyspub 1024D/4FB7906A
              2006-08-22uid Your Name (Comment)
              <[email protected]>sub 2048g/2A0DB1CE
              2006-08-22

For more information about generating a GPG key, please refer to the gpg (1) man page or to this excellent tutorial about GPG.

Go in the Manage Identities window ( SettingsConfigure KMail) and click on Cryptography: click on the Change buttons for the OpenPGP signing key and OpenPGP encryption key fields and select your key (see Figure 2.7, “Using OpenPGP within KMail”), then OK.

Figure 2.7. Using OpenPGP within KMail

Using OpenPGP within KMail

Two new icons are now displayed when you open a new composition window:

  •  Allows you to electronically sign your e-mail, which proves without a doubt that the e-mail comes from you.

  •  Permits you to encrypt a message for a specific recipient. Note however that the recipient must have shared his public key with you.

Once you're finished writing your e-mail, click on the relevant icon (sign, encrypt or both) then click on . A dialog box appears and you must confirm your key and the recipient's:

Figure 2.8. Encryption Key Approval Dialog

Encryption Key Approval Dialog

Finally, enter your GPG passphrase.

Figure 2.9. Passphrase Dialog

Passphrase Dialog

When you receive encrypted mail, you are prompted for your passphrase: simply type it in the dialog box which pops up.