Skip to content

Compose a multipart/related or multipart/alternative email quicky.

Notifications You must be signed in to change notification settings

alps2006/neomutt-markdown-multipart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

neomutt-markdown-multipart

Composing a multipart/related or multipart/alternative email quicky by markdown format.

It supports inline images, tables, list etc or other pandoc markdown format.

Dependencies

This script needs python3 and pandoc, so that you must install them .

If you use osx system, you can install them by brew install python3 and brew install pandoc

Usage

  1. Copy the "markdown.py" file to your /opt/bin/ or wherever is your wanted directory.

  2. Link the script to your executable path. example: ln -s /opt/bin/markdownmail.py /usr/local/bin/markdownmail

  3. Copy "email.html" and "styles.html" files to your ~/.local/share/templates/.

  4. Add the following line to your .muttrc so that you can convert a markdown to multipart email.

    macro compose m \
    "<pipe-message>markdownmail<enter>\
    <enter-command>source /tmp/msg.macro<enter>" \
    "Convert markdown to HTML5 and multipart content types"
    
    

Now, on the email sending screen (when you already wrote the markdown text and saved it) type m. The markdown text file was converted to multipart attachments (Maby be multipart/alternative or multipart/related). The related inline image was attached too. (Note: The markdonw image path must be absolute.)

multipart/related email

You can view original html by following bind. (osx use open command, you can change it to yourself.)

# open above msg.html file
macro compose O \
"\
<shell-escape>open /tmp/msg.html&<enter> \
" "open attach with default application"

Issues

  1. You might need to make the script executable if you have error about permissions.
  2. If your markdown file contains inline images, the path must be absolute.

References

https://github.com/anufrievroman/Neomutt-File-Picker/blob/master/filepicker

About

Compose a multipart/related or multipart/alternative email quicky.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published