Go Mail Versions Save

📧 A cross platform mail driver for GoLang. Featuring Mailgun, Postal, Postmark, SendGrid, SparkPost & SMTP.

v1.1.1

2 years ago
  • Added ability to pass custom headers via transmissions.
  • User can now pass in a custom http.Client to configuration.

v1.1.0

2 years ago
  • New Postmark driver.
  • Removed all external dependencies from Mailgun, Sparkpost & Sendgrid.
  • Refactored codebase.
  • Moved drivers to seperate package.

v1.0.3

2 years ago

v1.0.2

3 years ago

New SMTP Driver (non TLS).

func SMTP() {
	cfg := mail.Config{
		URL:         "smtp.gmail.com",
		FromAddress: "[email protected]",
		FromName:    "Gopher",
		Password:    "my-password",
		Port:        587,
	}

	driver, err := mail.NewClient(mail.SMTP, cfg)
	if err != nil {
		fmt.Println(err)
		return
	}

	tx := &mail.Transmission{
		Recipients: []string{"[email protected]"},
		Subject:    "My email",
		HTML:       "<h1>Hello from go mail!</h1>",
		PlainText:  "plain text",
	}

	result, err := driver.Send(tx)
	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(result)
}

v1.0.1

3 years ago

Fixed MailGun not rendering HTML

mailgun.go

message := m.client.NewMessage(m.cfg.FromAddress, t.Subject, t.PlainText, t.Recipients...)
message.SetHtml(t.HTML)

v1.0.0

3 years ago

This is the first release of the application which supports the following frameworks: SparkPost, MailGun, SendGrid Users should reference the README.md for more information, it is kept up to date with releases.