Skip to content
Create maildirs and write mails into it in Go
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


package maildir

This package is used for writing mails to a maildir, according to the specification located at


   type Maildir struct {
       // The root path ends with a /, others don't, so we can have 
       // the child of a maildir just with path + "." + encodedChildName.
       Path string

Represent a folder in a maildir. The root folder is usually the Inbox.

func New(path string, create bool) (m *Maildir, err os.Error)

Open a maildir. If create is true and the maildir does not exist, create it.

func (m *Maildir) Child(name string, create bool) (*Maildir, os.Error)

Get a subfolder of the current folder. If create is true and the folder does not exist, create it.

func (m *Maildir) CreateMail(data io.Reader) (filename string, err os.Error)

Write a mail to the maildir folder. The data is not encoded or compressed in any way.

Something went wrong with that request. Please try again.