

GitHub - go-gomail/gomail: The best way to send emails in Go.
source link: https://github.com/go-gomail/gomail
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md
Gomail
Introduction
Gomail is a simple and efficient package to send emails. It is well tested and documented.
Gomail can only send emails using an SMTP server. But the API is flexible and it is easy to implement other methods for sending emails using a local Postfix, an API, etc.
It is versioned using gopkg.in so I promise there will never be backward incompatible changes within each version.
It requires Go 1.2 or newer. With Go 1.5, no external dependencies are used.
Features
Gomail supports:
- Attachments
- Embedded images
- HTML and text templates
- Automatic encoding of special characters
- SSL and TLS
- Sending multiple emails with the same SMTP connection
Documentation
https://godoc.org/gopkg.in/gomail.v2
Download
go get gopkg.in/gomail.v2
Examples
See the examples in the documentation.
FAQ
x509: certificate signed by unknown authority
If you get this error it means the certificate used by the SMTP server is not
considered valid by the client running Gomail. As a quick workaround you can
bypass the verification of the server's certificate chain and host name by using
SetTLSConfig
:
package main
import (
"crypto/tls"
"gopkg.in/gomail.v2"
)
func main() {
d := gomail.NewDialer("smtp.example.com", 587, "user", "123456")
d.TLSConfig = &tls.Config{InsecureSkipVerify: true}
// Send emails using d.
}
Note, however, that this is insecure and should not be used in production.
Contribute
Contributions are more than welcome! See CONTRIBUTING.md for more info.
Change log
See CHANGELOG.md.
License
Contact
You can ask questions on the Gomail thread in the Go mailing-list.
Recommend
-
40
README.md Gomail
-
13
01 介绍 我们在项目开发中,经常会遇到发送邮件的需求,比如给开发人员发送报警邮件,给用户发送优惠券或兑换码等。 Gomail 是发送电子邮件的简单高效的包。它已经过充分测试和记录。Gomail 只能使用 SMTP 服务器发送电子邮件。但是...
-
11
How to send emails with Rust Tue, Mar 16, 2021 Sending emails in Rust can be achieved in two ways: either by using an SMTP server or by using a third-party service with an API such as AWS SES...
-
7
The 7 Emails You Should Send Every Week to Get Ahead in Your Career
-
50
Marketing ...
-
8
How to send a large number of emails using the php and shell command advertisements Here I am facing a problem when I am send email in loop. T...
-
32
When is the Best Time to Send Email? By Kelly Forst July 27, 2021 Discover the best time to send emails to your subscribers. Use this knowledge to boost open r...
-
16
Using Amazon SES and S3 to Send Emails with AttachmentsAugust 19th 2021 new story5
-
7
Golang:Gomail一个简单高效的电子邮件发送包 精选 原创 彭世瑜 2022-09-19 10:37...
-
4
【代码】Go语言通过gomail发送邮件 2023-03-28 ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK