EnglishFrenchSpanish

Ad


OnWorks favicon

mailplate - Online in the Cloud

Run mailplate in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command mailplate that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


mailplate - reformat mail drafts according to templates

SYNOPSIS


mailplate [[--new | -n] | [--editor | -e]] [--keep-unknown | -k] [--verbose | -v] [--debug
| -d] template-name message-file

mailplate [--keep-unknown | -k] [--verbose | -v] [--debug | -d] template-name
< message-data

mailplate [[--auto | -a] | [--menu | -m]] [[--new | -n] | [--editor | -e]] [--keep-unknown
| -k] [--verbose | -v] [--debug | -d] message-file

mailplate [[--auto | -a] | [--menu | -m]] [--keep-unknown | -k] [--verbose | -v] [--debug
| -d] < message data

mailplate [--help | -h]

mailplate [--version | -V]

DESCRIPTION


mailplate is a programme that reformats mail drafts according to a given template. The
template may be specified on the command line, but mailplate can also use control
information from the template files to automatically select an appropriate template
(--auto). A selection menu feature is planned (--menu).

Applying a template means obtainined select data from an existing mail message (unless
--new is specified) and to fill it into appropriate slots in the template. Messages are
processed in three parts: headers, body, and signature.

When --new is given, an empty instantiation of the template is written to stdout. At the
moment, --new cannot be combined with --editor.

The template can define two types of headers: mandatory and preservatory. Mandatory
headers take precedence over headers in the existing message and thus overwrite them.
Preservatory headers instruct mailplate to port their data from the existing mail message.
Headers in the existing message but not defined in the template are dropped, unless
--keep-unknown is given.

Body and signature are separated by ´-- ´. If this sentinel is not found, no signature is
extracted. Templates can be interpolated and data filled into slots. Helper slots are
filled with the output of helper commands (which must be defined in the configuration),
environment variable slots are just that, and mail variable slots can be filled with data
obtained by running regexps or commands over the message.

This script can be run in multiple ways:

· As a filter, it applies a template to data from stdin and writes the result to stdout.

· When --editor is passed, the script spawns sensible-editor on the result. It may thus
be used as the editor for your mail user agent.

· Given a file, it modifies the file, unless it cannot write to the file, in which case
it writes to stdout.

OPTIONS


These programs follow the usual GNU command line syntax, with long options starting with
two dashes (`--´):

--auto, -a
Turn on template auto-discovery.

--menu, -m
Choose from a list of templates (not yet implemented)

--new, -n
Create a new message.

--editor, -e
Spawn editor once template is applied.

--keep-unknown, -k
Preserve mail headers not specified in template.

--verbose, -v
Write informational messages to stderr.

--debug, -d
Start a debugger after initialisation.

--help, -h
Show summary of options.

--version, -V
Show version of program.

MUTT INTEGRATION


I use mailplate as my $editor for mutt, with the following setting in my ~/.mutt/muttrc:

set editor="~/.bin/mail/mailplate --edit --auto --keep-unknown"

mailplate currently has a bit of a limitation, or at least I have not figured out a way
how to work around it sensibly yet. If you re-edit a message from mutt’s compose menu, it
causes mailplate to reprocess the message, which you may not want.

Similarly, if you find yourself editing messages from the index or pager, you probably
also don’t want mailplate to get in the way. For these cases, I currently use the
following two keybindings:

macro compose e ´:set my_editor="$editor"<enter>:set editor=sensible-editor<enter><edit-headers>:set editor="$my_editor"<enter>´ "invoke normal editor to edit message"
macro index,pager e ´:set my_editor="$editor"<enter>:set editor=sensible-editor<enter><edit>:set editor="$my_editor"<enter>´ "invoke normal editor to edit message"

VIM INTEGRATION


I am often editing a message with vim and find that I need to use a different identity.
For this purpose, I have the following keybindings in my ~/.vim/ftplugin/mail.vim:

nmap <buffer> <F1> :w<CR>:%!mailplate --keep-unknown --auto<CR>
nmap <buffer> <C-P><F1> :w<CR>:%!mailplate --keep-unknown private<CR>
nmap <buffer> <C-P><F2> :w<CR>:%!mailplate --keep-unknown debian<CR>

Now when I reply to a message, mailplate automatically choses the right template, and if I
later change my mind, I can press C-p, to override the choice and select the private
template, or just hit to have it re-run the auto-detection.

Use mailplate online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    AstrOrzPlayer
    AstrOrzPlayer
    AstrOrz Player is a free media player
    software, part based on WMP and VLC. The
    player is in a minimalist style, with
    more than ten theme colors, and can also
    b...
    Download AstrOrzPlayer
  • 2
    movistartv
    movistartv
    Kodi Movistar+ TV es un ADDON para XBMC/
    Kodi que permite disponer de un
    decodificador de los servicios IPTV de
    Movistar integrado en uno de los
    mediacenters ma...
    Download movistartv
  • 3
    Code::Blocks
    Code::Blocks
    Code::Blocks is a free, open-source,
    cross-platform C, C++ and Fortran IDE
    built to meet the most demanding needs
    of its users. It is designed to be very
    extens...
    Download Code::Blocks
  • 4
    Amidst
    Amidst
    Amidst or Advanced Minecraft Interface
    and Data/Structure Tracking is a tool to
    display an overview of a Minecraft
    world, without actually creating it. It
    can ...
    Download Amidst
  • 5
    MSYS2
    MSYS2
    MSYS2 is a collection of tools and
    libraries providing you with an
    easy-to-use environment for building,
    installing and running native Windows
    software. It con...
    Download MSYS2
  • 6
    libjpeg-turbo
    libjpeg-turbo
    libjpeg-turbo is a JPEG image codec
    that uses SIMD instructions (MMX, SSE2,
    NEON, AltiVec) to accelerate baseline
    JPEG compression and decompression on
    x86, x8...
    Download libjpeg-turbo
  • More »

Linux commands

  • 1
    abi-tracker
    abi-tracker
    abi-tracker - visualize ABI changes
    timeline of a C/C++ software library.
    DESCRIPTION: NAME: ABI Tracker
    (abi-tracker) Visualize ABI changes
    timeline of a C/C+...
    Run abi-tracker
  • 2
    abicheck
    abicheck
    abicheck - check application binaries
    for calls to private or evolving symbols
    in libraries and for static linking of
    some system libraries. ...
    Run abicheck
  • 3
    couriermlm
    couriermlm
    couriermlm - The Courier mailing list
    manager ...
    Run couriermlm
  • 4
    couriertcpd
    couriertcpd
    couriertcpd - the Courier mail server
    TCP server daemon ...
    Run couriertcpd
  • 5
    gbklatex
    gbklatex
    bg5latex - Use LaTeX directly on a Big5
    encodedtex file bg5pdflatex - Use
    pdfLaTeX directly on a Big5 encodedtex
    file bg5+latex - Use LaTeX directly on a
    Big5+...
    Run gbklatex
  • 6
    gbkpdflatex
    gbkpdflatex
    bg5latex - Use LaTeX directly on a Big5
    encodedtex file bg5pdflatex - Use
    pdfLaTeX directly on a Big5 encodedtex
    file bg5+latex - Use LaTeX directly on a
    Big5+...
    Run gbkpdflatex
  • More »

Ad