An email MIME artist for golang

Marcel

PkgGoDev

Marcel is a tool to generate IETF compliant emails in raw MIME format. I mainly use this for generating emails with attachments and sending them via amazon SES. If that's what you're doing too, you may want notifications

Marcel supports:

  • HTML bodies
  • Text bodies
  • Emails with only an HTML or Text body
  • Attachments
  • JSON serialisation of emails and attachments

Marcel does not support:

  • Inline attachments

Marcel endeavours to pass the IETF Msglint tool with no errors (aside from ReturnPath). If you have a payload that generates errors please file an issue.

Example

package main

import (
	"fmt"
	"log"
	"strings"

	"github.com/davidbanham/marcel"
)

func main() {
	mail := marcel.Email{
		To:      "[email protected]",
		From:    "[email protected]",
		ReplyTo: "[email protected]", // optional
		Text:    "This is the important information in text format",
		HTML:    "This is the important information in HTML format",
		Subject: "A really important email",
		Attachments: []marcel.Attachment{
			marcel.Attachment{
				ContentType: "text/plain",
				Data:        strings.NewReader("A very important attachment"), // Data will be base64 encoded before sending
				Filename:    "test_data.txt",
			},
		},
	}

	rawEmail, err := mail.ToMIME()
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(string(rawEmail))
}
Owner
David Banham
I build things! Software, products, companies, teams.
David Banham
Similar Resources

:white_check_mark: A Go library for email verification without sending any emails.

email-verifier ✉️ A Go library for email verification without sending any emails. Features Email Address Validation: validates if a string contains a

Dec 30, 2022

:incoming_envelope: Simple email interface across multiple service providers (ses, postmark, mandrill, smtp)

:incoming_envelope: Simple email interface across multiple service providers (ses, postmark, mandrill, smtp)

go-mail Lightweight email package with multi-provider support (ses, mandrill, postmark) Table of Contents Installation Documentation Examples & Tests

Dec 10, 2022

✉️ A Go library for email verification without sending any emails.

email-verifier ✉️ A Go library for email verification without sending any emails. Features Email Address Validation: validates if a string contains a

Jun 24, 2021

End-to-end encrypted email for the mesh networking age

Yggmail It's email, but not as you know it. Introduction Yggmail is a single-binary all-in-one mail transfer agent which sends and receives email nati

Jan 2, 2023

envio de email via SMTP com anexo usando Go

gosendmail - SMTP This repo is a simple net/smtp abstraction for sending emails using SMTP. With it we can send emails With copy, with blind copy and

Aug 18, 2022

Go implementation of the JWZ email threading algorithm

Go implementation of the JWZ email threading algorithm

The JWZ Threading algorithm written in Go This is an open source Go implementation of the widely known JWZ message threading algorithm originally writ

Oct 31, 2022

a simple api that sent spam via sms and email

a simple api that sent spam via sms and email routes: /sms /email example request with python

Oct 19, 2021

📮 Simple (but useful) email sender written in pure Go v1.17. Support HTML templates and attachments.

📮 Go Email Sender Simple (but useful) email sender written in pure Go v1.17. Yes, yet another email package here! 😅 Support HTML templates and attac

Dec 31, 2021

Monitoring and automation for Open Source email servers, starting with Postfix.

Monitoring and automation for Open Source email servers, starting with Postfix.

Welcome to Lightmeter Control Center, the Open Source mailops monitoring application.

Dec 19, 2022
Related tags
Email-searcher - Given a domain name and real name, attempt to find an existing email for that user.

email-searcher Given a domain name and real name, attempt to find an existing email for that user. Using Run it with both the domain and name flags, l

Jan 2, 2022
Sending emails using email server talking to RabbitMQ and send grid server sending emails to email ids consumed from RabbitMQ
Sending emails using email server talking to RabbitMQ and send grid server sending emails to email ids consumed from RabbitMQ

Sending emails using email server talking to RabbitMQ and send grid server sending emails to email ids consumed from RabbitMQ

Oct 27, 2022
MIME mail encoding and decoding package for Go

enmime enmime is a MIME encoding and decoding library for Go, focused on generating and parsing MIME encoded emails. It is being developed in tandem w

Nov 30, 2022
Send markdown files as MIME-encoded electronic mail.

Send markdown files as MIME-encoded electronic mail.

Aug 9, 2022
Golang package for send email. Support keep alive connection, TLS and SSL. Easy for bulk SMTP.

Go Simple Mail The best way to send emails in Go with SMTP Keep Alive and Timeout for Connect and Send. IMPORTANT Examples in this README are for v2.2

Jan 8, 2023
EMail Searcher By Golang
EMail Searcher By Golang

GiveMeMail ▄████ ██▓ ██▒ ██▓ ▓██████ ███▄ ▄███▓▓██████ ███▄ ▄███▓ ██ ██▓ ██▓ ██▒ ▀█▒ ▓██▒ ▓██░ █▒ ▓█ ▀ ▓██▒▀█▀ ██▒▓█

Dec 4, 2021
An email service written in Golang
An email service written in Golang

furion An email service written in Go. Architecture Diagram

Dec 19, 2021
Email - Emailing with limitator for golang

email Emailing with optional limiter. It will send no more then limiterMax email

Jan 3, 2022
Golang library for sending email using gmail credentials

library for sending email using gmail credentials

Jan 22, 2022
Robust and flexible email library for Go

email Robust and flexible email library for Go Email for humans The email package is designed to be simple to use, but flexible enough so as not to be

Dec 30, 2022