https://github.com/vanng822/postfix
Sending mail through postfix SMTP server
https://github.com/vanng822/postfix
golang mail postfix premailer smtp
Last synced: 6 months ago
JSON representation
Sending mail through postfix SMTP server
- Host: GitHub
- URL: https://github.com/vanng822/postfix
- Owner: vanng822
- License: mit
- Created: 2019-04-09T18:30:12.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-01-31T19:17:52.000Z (over 1 year ago)
- Last Synced: 2025-01-31T20:23:55.238Z (over 1 year ago)
- Topics: golang, mail, postfix, premailer, smtp
- Language: Go
- Homepage:
- Size: 30.3 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# postfix
Sending mail through postfix SMTP server
# example
```go
import (
"github.com/vanng822/postfix"
)
fromAddr := postfix.NewAddress(from, fromEmail)
toAddr := postfix.NewAddress(to, toEmail)
msg, err := postfix.MultipartMessage(fromAddr, toAddr, subject, text, html)
if err != nil {
log.Fatal("Postfix mailing with error", err)
}
err := postfix.Send(msg)
if err != nil {
log.Fatal("Postfix mailing with error", err)
}
```