QuoteFix is a plug-in for Mail.app which fixes some issues with replying to e-mail:
It also provides customized attributions for replies and forwards.
Before installing the plug-in, you'll need to make sure that Mail.app's plug-in support is turned on. For this, execute the following two commands in Terminal.app:
defaults write com.apple.mail EnableBundles -bool true
defaults write com.apple.mail BundleCompatibilityVersion -string 3
Next, perform the following steps:
~/Library/Mail/
Bundles
folder doesn't yet exist, create an
empty one
QuoteFix.mailbundle
into the Bundles
folderLastly, quit Mail.app if it's running, and start it up again.
In case you run into any problems, or want to
uninstall QuoteFix, just remove QuoteFix.mailbundle
from
the bundle-folder and restart Mail.app.
After installation, QuoteFix is enabled. It will perform its magic automatically when you reply to, or forward, messages.
The behaviour of the plug-in is customizable via its preferences. QuoteFix has it's own preference pane in the preferences window of Mail.app. Most preferences speak for themselves, or have a useful tooltip which pops up when you hover the cursor above it.
If you temporarily want to turn off QuoteFix, but don't want to
uninstall it, check off the QuoteFix is
enabled checkbox. As of version 2.3.1, (de)activating
QuoteFix can be done from a menu item in the Mail
menu. You could use the
standard way of assigning a keyboard shortcut to a menu item in
Mac OS X to enable or disable QuoteFix with a keyboard
shortcut.
QuoteFix also provides the ability to define your own attribution
lines (the first line of a reply/forward, usually looking something
like On SOME DATE, at SOME TIME, SOMEONE wrote:
).
Customized attributions work by way of templates: you define a template in the preferences, and parts of the template will – at the time of replying or forwarding – be replaced by values reflecting parts of the message you are replying to or forwarding.
Templating works by replacing template variables with values.
A template variable looks like this:
${VARIABLE}
. It will be replaced with a value
depending on what VARIABLE
contains.
A (non-exhaustive) list of variables you can use:
${message.from} |
Name and e-mail address of sender of message: Your Friend <yourfriend@example.com> |
${message.from.name} |
Name of sender of message: Your Friend |
${message.from.email} |
E-mail address of sender of message: yourfriend@example.com |
${message.to} |
Your e-mail address (this is the address that was used for
the message to reach you). This is more like the
Delivered-To header than the To
header (for that, see ${message.recipients} )
|
${message.recipients} |
A list of all the recipients of the message, as mentioned in
both the To and Cc headers.
|
${message.recipients.to} |
A list of the recipients of the message mentioned in
the To header.
|
${message.recipients.cc} |
A list of the recipients of the message mentioned in
the Cc header.
|
${message.subject} | The subject of the message. |
${message.sent} ${message.received} |
Sent/received timestamps. If you want more finegrained
control over formatting timestamps, these variables split
into separate fields: year , month ,
day , hour , hour12 ,
ampm , minute , second ,
weeknumber , monthshort ,
monthlong , dayshort ,
daylong , date , time .Use these like so: ${message.sent.year} .
|
If you want even more freedom in formatting attribution lines, there's an experimental feature (which can be enabled in the Advanced preferences) which enables conditional statements, string/date formatting, and much more. This is based on a modified version of the pyratemp templating library for Python written by Roland Koebler.
A small example of what's possible:
From: ${message.from}
{% if message.recipients.to %}
To: ${message.recipients.to.join("; ", "name")}
{% end %}
{% if message.recipients.cc %}
Cc: ${message.recipients.cc.join("; ", "name")}
{% end %}
Subject: ${message.subject.lower()}
Sent-Date: ${message.sent.strftime("%d-%m-%Y")}
You can also enable HTML-formatting for your custom attributions. For this to work, the (outgoing) message format should be Rich Text. You can have QuoteFix automatically convert a message to Rich Text if your attribution should be interpreted in HTML. Otherwise, QuoteFix will issue a warning.
If you want to mimic the attribution generated by Outlook, try this
(with HTML-formatting enabled):
<b>From:</b> ${message.from}
<b>Date:</b> ${message.received}
<b>To:</b> ${message.to}
<b>Subject:</b> ${message.subject}
When you're editing your customized attribution, QuoteFix will generate an approximate preview as tooltip of the text field you're entering the attribution in.
If you want even more finegrained control over the formatting of
dates and times, you can enable "advanced templating" in the
Advanced preferences, after which date/time variables like
message.sent
and message.received
will
have .format
and .strftime
methods with
which you can format the output of the objects.
Functionally, these two methods perform the same operation — namely formatting date/time objects — the difference is in the formatting strings used:
.strftime
uses the common Unix function with
the same name for formatting. Look
here for more information.
.format
uses the Unicode date format patterns.
Look here for more information.
An example:
${message.sent.format("EEE MMM dd yyyy HH:mm:ss")}
This will output: Sun Nov 06 2011 10:19:34
However: the output will be generated in the current locale, which means that it will be formatted according to your local language settings. See below on how to use a different locale.
Similarly, with .strftime
:
${message.sent.strftime("%a %b %d %Y %H:%M:%S")}
Both methods accept a second argument: a locale identifier. You can use it to convert the output to a certain locale, instead of the default locale (which can be changed in the System Preferences of Mac OS X: Language & Text > Formats).
The same example as above, but with a different locale:
${message.sent.format("EEE MMM dd yyyy HH:mm:ss", 'fr_FR')}
The output: dim. nov. 06 2011 10:19:34
If you want the default format, just in a different locale,
use the .locale
method:
${message.sent.locale('fr_FR')}
QuoteFix has various ways of turning off its behaviour, short of uninstalling it:
Option
whilst
initiating a Reply/Forward action. That is:
Option
will enable QuoteFix for that particular message only;
Option
will disable QuoteFix for that particular message only;
See the Wiki for a list of frequently asked questions, and their answers.
This plugin is written by Robert Klep and is provided "as-is", without any warranties whatsoever.
QuoteFix' downloads and support is hosted by GitHub at https://github.com/robertklep/quotefixformac
QuoteFix uses the Sparkle framework from Andy Matuschak to provide software updates, which comes with the following permission notice:
See also http://sparkle.andymatuschak.org/