[MlMt] insertFormatString... ${} expansions listed somewhere?

Benny Kjær Nielsen mailinglist at freron.com
Thu Sep 18 11:54:31 EDT 2014


On 18 Sep 2014, at 14:42, Jeremy Cowgar wrote:

> OK, that got me a step closer, however I'm not exactly sure how to use 
> the ${cc} variable correctly, or maybe it can't be. It is returning to 
> me only the first person on the Cc list, not the entire list. Is there 
> a way to get the Cc list?

No, sorry, not supported yet. At least not for simple format strings. (A 
more advanced approach is used for, e.g., the configuration of the 
messages outline.)

> My company wants corporate email replied to in Outlook fashion :-(.

That is simply depressing. I cannot imagine the reasoning behind such a 
strange requirement. I might be alone on this, but when I see this 
quoting style then “competent professional” are not the first words 
to cross my mind :-)

> I am just playing around with ways to make this work in MailMate. I've 
> managed to do this so far:
>
> 	"R" = (
> 		"replyAll:",
> 		"insertFormatString:",
> 		"-----Original Message-----\nFrom: ${to.name} 
> [mailto:${to.address}\nTo: ${from.name} [mailto:${from.name}]\nCc: 
> ${cc.name}\nSent: ${date}\nSubject:${subject}\n"
> 	);
>
> This is only one small piece of the puzzle. I have thought about a 
> Bundle to accomplish this task, but it seems to get only the quote, 
> not any other information about the email, thus I can't add the above 
> header.

Yes, this is not so easily accomplished yet. What is really needed is 
some kind of system for specifying prefaces (wrote-strings) and then let 
MailMate handle it similarly to signatures. That way you could also 
easily reply to me without using Outlook reply-style :-)

This has been on the todo for a long time. My own motivation is that I 
want it to be easier to use multiple languages.

Hmm, `insertFormatString:` is not well suited for this since it is based 
on the reply and not the original string.

> Any thoughts would be appreciated, and yes... I don't like the Outlook 
> methodology, but they are really pushing it. I'm willing to go to 
> great lengths to avoid using Outlook for my work email, just for the 
> reply message!

A short term solution would be to support the insertion of the advanced 
type of format strings. I've changed `MmReplyWroteString` such that if 
the first character is `{` then it's the “advanced” formatting 
style. This works in the next test version of MailMate (probably 
tomorrow).

Now, I almost hate myself for this, but you would then get something 
like what you want by pasting this in the Terminal:

~~~
defaults write com.freron.MailMate MmReplyWroteString -string "{
	children =
	(
		{
			string = '-----Original Message-----\n';
		},
		{
			formatString = 'From: \${from.name} <\${from.address}>\n';
		},
		{
			sharedPrefix = 'to';
			separatorString = ', ';
			children = (
				{
					prefixString = 'To: ';
					formatString = '\${to.name} <\${to.address}>';
					suffixString = '\n';
				}
			);
		},
		{
			sharedPrefix = 'cc';
			separatorString = ', ';
			children = (
				{
					prefixString = 'Cc: ';
					formatString = '\${cc.name} <\${cc.address}>';
					suffixString = '\n';
				}
			);
		},
		{
			formatString = 'Sent: \${date}\n';
		},
		{
			formatString = 'Subject: \${subject}\n';
		},
	);
}
"
~~~

Remember, it won't work before I've uploaded another test release.

-- 
Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20140918/30832a60/attachment.html>


More information about the mailmate mailing list