How to Create Custom Email Templates in KMail

Many Internet users have turned to web-based email and use it as their primary means of electronic communication. Some corporations have even adopted “cloud computing” solutions, where their email delivery and retrieval is handled by an outside company. Nevertheless, there are many reasons why a user might still prefer a traditional email client.  Because of that, even the aforementioned web-based email services often still offer POP3 and/or IMAP service.

KMail, KDE’s email client, is a robust and still very popular choice for those who still prefer to have their emails on their desktop, even when they are offline. It is part of the Kontact PIM (Personal Information Management) suite and offers many useful and unique features.  Among those features is the ability to create advanced email templates.

Business and organizations in particular will find this feature beneficial. For example, suppose your business receives online orders, and you need to send custom replies to each customer. Most of the emails you send will contain identical information, but the name and other contact information needs to be different. KMail allows you to create such templates and even program KMail to use them in certain situations.

To begin creating a template, do the following:


1. In the menu, click “Settings

2. Click “Configure KMail

3. Click the “Composer” button

4. At the top, click the “Custom Templates” tab (You can also edit current templates in the “Standard Templates” tab)

5. In the top left, there is a text box. Type the name of your template, and click the plus button to create it

6. In the bottom right, where it says “Template type“, select the type you need. If it will be for new messages, leave it on “Universal”

7. At the bottom, click “Insert Command


A menu will appear with several options: Original Message, Current Message, Process With External Programs, and Miscellaneous. For this example, you will create a reply message.

8. From the “Current Message” menu, choose “Time” and press Enter twice

9. From the “Current Message” choose “Day of the Week” and then choose “Date”

10. Next, skip a couple of lines and type the word “Dear,” followed by a space

11. Return to the “Original Message” menu and click “To Field Name

12. Type “Our records indicate that you contacted our sales department”, type a space, and then from the “Original Message” menu, choose “Date”

13. Skip several lines, and from the “Current Message” menu, enter a closing statement followed by your signature

14. Finally, skip a few more lines, and type “%QUOTE

The final reply template will look like this:

00:00 pm
Sunday 03 January 2010

Dear So-and-So,

Our records indicate that you contacted our sales department on Sunday 03 January 2010.

Body of your message

Your closing and Signature

Quoted original message

This is a basic template just to give you an idea of the flexibility you have with it. You can create multiple templates for various situations and recipients. When you receive an email that requires a reply with one of the templates you created:


1. Right click on the message

2. Select “Reply”

3. Move down to “Reply with Custom Template”

4. Select your template

Similarly, if you are creating a new message:

1. Click “File” in the top menu

2. Select “New”

3. Select “Message from Template”

4. Click on your template.

As I mentioned earlier, you can apply certain templates to particular email recipients. The easiest way to do this is to create a folder for the recipients of a particular template and then create a filter that automatically moves any message to or from a particular email to that folder (We will learn how to make a filter next week). Finally, do the following:

1. Right click on the new folder

2. Click “Properties”

3. Click the “Templates” tab

4. Check “Use custom message templates in this folder”

5. Modify the given templates or copy and paste the custom templates you made earlier.

Once you have your templates created, using them is just a matter of a few clicks. You can also go back and tweak them whenever you need something changed. With custom templates, whatever business or email activities you performed that once seemed laborious will now run smoothly and quickly.

Tavis J. Hampton

Tavis J. Hampton is a freelance writer from Indianapolis. He is an avid user of free and open source software and strongly believes that software and knowledge should be free and accessible to all people. He enjoys reading, writing, teaching, spending time with his family, and playing with gadgets.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox