mailprint

package module
v0.0.0-...-30d5073 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

README

Mailprint Deluxe!

Mailprint is a replacement for muttprint: It reads an email on stdin and writes a PDF on stdout.

System requirements

  • GNU roff (groff): to format the mail to PDF
  • ImageMagick's convert: to convert profile pictures to PDF format

groff is usually already installed on Linux, because it is used to format man pages. ImageMagick is a popular package for doing image manipulation on the command line.

Installation and setup

Installation:

go install github.com/gnoack/mailprint/...@latest

In your muttrc:

set print_command="mailprint | lpr"

Alternatively, print it into a PDF viewer which first lets you look at the result:

set print_command="mailprint | zathura -"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(em *Email, pageFormat, logoPdf string, w io.Writer) error

Types

type Email

type Email struct {
	Subject  string
	From     []*mail.Address
	To       []*mail.Address
	Cc       []*mail.Address
	Date     time.Time
	TextBody string
}

func Parse

func Parse(r io.Reader) (*Email, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL