Customize your replies with Claws Mail Templates
Lately I have been on a roll with Claws mail (see "Claws Mail: The unsung powerhouse email client", "Claws Mail must have plugins", "Create Message Filters in Claws Mail", and "Encrypting email in Claws Mail".)
The reason for that? It's an outstanding email client that is powerful, fast, and very flexible. In fact I would argue that Claws Mail is one of the most flexible email clients available. To illustrate that I want to introduce you to a feature that I find a "must use" for my email needs. That feature? Templates.
The Claws Mail template feature allows you to create specific templates that format your email in precisely the way you want them. Your compositions, your replies, and your forwards can leave your PC laid out exactly the way you want them. And it doesn't take a programmer or guru to set templates up. You just have to understand the strings used by Claws Mail that allow you to insert specific, pre-configured fields into the body of your email.
You can create templates within one of two windows: "Preferences for current account" or "Preferences" (the former only configures templates for the account being used and the latter configures templates globally). Both of these windows can be opened from within the Configuration menu. Once in either of these windows go to the Templates section where you will find three tabs (see Figure 1): Compose, Reply, and Forward. The first thing you must do is decide what type of template you want to create. Most often people use the Reply template so they can format how they want their replies to look.
As you can see, in Figure 1, I have already created a template. The template I have created does this when I reply to an email:
The first line of the reply reads In a recent email ORIGINAL_SENDER said the following:
QUOTED_EMAIL
to this REPLY_SENDER says:
BODY_OF_REPLY
A: Because it makes understanding the conversation harder?
Q: What is wrong with top posting?
- Where ORIGINAL_SENDER is who the email came from.
- Where QUOTED_EMAIL is the quoted text of the email you are replying to.
- Where REPLY_SENDER is the full name of the user replying.
- Where BODY_OF_REPLY is the text written in the reply.
You will also notice a bit of snarkiness at the end. ;-)
To achieve this layout I used the following pre-defined tags:
- %N - Original sender.
- \n - New line marker.
- %Q - Quoted message body.
- %af - Full name of sender (me).
- %X - Cursor position.
The %X tag is one of the most interesting of the tags. It is with this tag you define where you want your cursor to be placed when you begin the email. Because Claws Mail defaults to bottom posting, and has no means to change this to top posting, you have to define top posting by using the %X tag. So if I want to always top post in my replies I would create a reply template like this:
%X\n
Is my reply to an email sent by %N, that said:\n
%Q
To get a full list of all the possible tags to use click the Information button inside of the Templates configuration window. You will also notice you can use regular expressions in your templates. The possibilites abound!
Final thoughts
Once you start using templates in Claws Mail you will really begin to see how flexible this application is. Once I started using templates I never looked back to Thunderbird. Have you created a cool template for Claws Mail? If so, share it with your fellow Ghacks readers.
Hello,
Thanks for your article on template. I’ve been browsing the web looking for a way to place the cursor, in a new message, in the “to” field, but this field doesn’t appear to be available.
In fact, I can’t even get the cursor in the subject window. %X only works in the message body.
Sorry, I realise you’re no Claws helpdesk, just thought someone might have the answer and care to share it.
Thanks, have a good day!
Nice of you to go to the trouble of writing this tip. It helped me enormously. I didn’t know by reading the manual how to place the cursor at the top of the reply as I’m used to on the Mac – we’re using an old notebook computer running Ubuntu 10.10.
All the best.
G
We have now recaptured mikeyf and returned him to the facility. Thank you for your patience.
The fact that there isn’t a simple toggle button to switch between top posting and bottom posting makes me want to murder people. I mean seriously what the fuck are you guys thinking? Yes I like claws mail and yes I think that top posting is bad and yes I myself never top post but apparently 99% of users believe that top posting is normal and anything else is an error in the program.
I’m thankful for having a free and great client like claws available but really your ideology is really running wild here. Adding a toggle switch for top posting isn’t going to compromise your integrity. Now I have to read a fucking article and sit and figure out the format strings to get top posting to work . Thank you very much and fuck you.
not for windows xp?
http://www.claws-mail.org/win32/
Before I was able to quit using windows I previously used sylpheed which is what spawned claws mail. Now both projects head down separate tracks and claws mail seems to have more plugins, however it now looks like there’s a port to windows for claws mail.
Enjoy!
Q. Why do people still use windows?
Great great great and (please) more more more.