Popularity
4.0
Stable
Activity
0.0
Stable
82
2
15
Programming language: Go
License: MIT License
Tags:
Email
Latest version: v1.9.0
go-premailer alternatives and similar packages
Based on the "Email" category.
Alternatively, view go-premailer alternatives based on common mentions on social networks and blogs.
-
hermes
Golang package that generates clean, responsive HTML e-mails for sending transactional mail -
SendGrid
The Official Twilio SendGrid Led, Community Driven Golang API Library -
email-verifier
:white_check_mark: A Go library for email verification without sending any emails. -
chasquid
SMTP (email) server with a focus on simplicity, security, and ease of operation [mirror] -
paperboy
💌💨 Email Campaign Delivery built with GoLang inspired by GoHugo -
go-message
:envelope: A streaming Go library for the Internet Message Format and mail messages -
go-simple-mail
Golang package for send email. Support keep alive connection, TLS and SSL. Easy for bulk SMTP. -
Mailchain
Using Mailchain, blockchain users can now send and receive rich-media HTML messages with attachments via a blockchain address. -
go-mail
:incoming_envelope: Simple email interface across multiple service providers (ses, postmark, mandrill, smtp) -
truemail-go
🚀 Configurable Golang 📨 email validator/verifier. Verify email via Regex, DNS, SMTP and even more.
Less time debugging, more time building
Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.
Promo
scoutapm.com
Do you think we are missing an alternative of go-premailer or a related project?
README
go-premailer
Inline styling for HTML mail in golang
Document
install
go get github.com/vanng822/go-premailer/premailer
Example
import (
"fmt"
"github.com/vanng822/go-premailer/premailer"
"log"
)
func main() {
prem, err := premailer.NewPremailerFromFile(inputFile, premailer.NewOptions())
if err != nil {
log.Fatal(err)
}
html, err := prem.Transform()
if err != nil {
log.Fatal(err)
}
fmt.Println(html)
}
Input
<html>
<head>
<title>Title</title>
<style type="text/css">
h1 { width: 300px; color:red; }
strong { text-decoration:none; }
</style>
</head>
<body>
<h1>Hi!</h1>
<p><strong>Yes!</strong></p>
</body>
</html>
Output
<html>
<head>
<title>Title</title>
</head>
<body>
<h1 style="color:red;width:300px" width="300">Hi!</h1>
<p><strong style="text-decoration:none">Yes!</strong></p>
</body>
</html>
Commandline
> go run main.go -i your_email.html
> go run main.go -i your_mail.html -o process_mail.html
Demo
http://premailer.isgoodness.com/
Conversion endpoint
http://premailer.isgoodness.com/convert
request POST:
html: your mail
cssToAttributes: true|false
removeClasses: true|false
response:
{result: output}