An open API service indexing awesome lists of open source software.

https://github.com/febytanzil/gomailer

wrapper golang smtp email with reconnection
https://github.com/febytanzil/gomailer

context email go golang mail postmark smtp

Last synced: about 1 month ago
JSON representation

wrapper golang smtp email with reconnection

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.com/febytanzil/gomailer.svg?branch=master)](https://travis-ci.com/febytanzil/gomailer)
# gomailer
wrapper golang email with automatic reconnection

## Intentions & Features
- Based on https://gopkg.in/gomail.v2
- Auto reconnection broken pipe from SMTP server
- Avoid too many login attempts because of redial & close
- Unit-testable/ mock-able with gomock provided
- Support Golang context
- Support [Postmark](https://postmarkapp.com/developer/api/overview)

## Usage
Example is provided in `example/` folder/ package
```
c, _ := gomailer.NewClient(gomailer.Gomail, &gomailer.Config{
Port: 587,
Host: "smtp.gmail.com",
Email: "[email protected]",
Password: "user_password",
})

err := c.Send(&gomailer.Message{
Body: "body" + t.String(),
Title: "test",
SendTo: []string{"[email protected]"},
})
```

## Offline Contributors
[erosaru](https://github.com/erosaru)