Simple mail merge

I’m a longtime fan and user of Tinderbox, but it wasn’t until recently that I realized it could be the solution to my canned email problem.

Each template message is its own Tinderbox note. The body of the note contains boilerplate text with value substitution calls that insert data from the note’s User Attributes. The example screenshot attached should clarify.

When I need to send an email, I duplicate the template note, alter the field data, then export the note to plain text. Then I delete the duplicate, just to keep things tidy. The contents of the plain text export are copied to an email message. Done and done.

See also: Using Tinderbox for Mail Merge (Gordon Meyer)

4 Likes

Very clever.

May I suggest a slight change to speed up your process?

In the example, attached, I added a $Body attribute, and this stamp:

$Body=exportedString(this,$Text);runCommand("echo " +"'" + $Body + "'" + "| pbcopy")

What this does is to parse the export code in $Text and place the result in $Body. Then, then stamp calls the “echo” command with runCommand() and places $Body onto the clipboard. With that you can paste the result directly into your mail message body and avoid the export and post-export cleanup processes.

Mail to Clipboard.tbx (76.7 KB)

I also did some slight adjustments to the export code.

Very nice! Thank you. I appreciate the clever addition, and the cleanup of my old school export syntax. Much appreciated!

Hmm, it occurs to me just now that if the export were URL encoded, it might be possible to format a “mailto://” URL that created the outgoing message.

1 Like