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: 11 months ago
JSON representation
wrapper golang smtp email with reconnection
- Host: GitHub
- URL: https://github.com/febytanzil/gomailer
- Owner: febytanzil
- License: mit
- Created: 2018-11-16T04:53:16.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-11-02T12:52:37.000Z (over 4 years ago)
- Last Synced: 2025-02-07T14:28:27.264Z (over 1 year ago)
- Topics: context, email, go, golang, mail, postmark, smtp
- Language: Go
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](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: "user@email.com",
Password: "user_password",
})
err := c.Send(&gomailer.Message{
Body: "body" + t.String(),
Title: "test",
SendTo: []string{"receiver@mail.com"},
})
```
## Offline Contributors
[erosaru](https://github.com/erosaru)