Skip to content

Small library for constructing RFC 2822 style multipart messages.

License

Notifications You must be signed in to change notification settings

jeroenrinzema/postbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Postbox 📬

A small library for constructing RFC 2822 style multipart messages. This library could be used to interact with a SMTP server to send mail.

package main

import (
	"strings"

	"github.com/jeroenrinzema/postbox"
)

func main() {
	body := postbox.Part{
		ContentType: "message",
		Encoding:    postbox.Base64,
		Reader:      strings.NewReader("https://www.youtube.com/watch?v=dQw4w9WgXcQ"),
	}

	mail := postbox.Envelope{
		From:    "[email protected]",
		Sender:  "[email protected]",
		ReplyTo: "[email protected]",
		To:      []string{"[email protected]", "[email protected]"},
		Subject: "Check this out!",
		Parts:   []*postbox.Part{&body},
	}
}

About

Small library for constructing RFC 2822 style multipart messages.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages