Martin TournoijandSimon Ser ab24fe7cbe Remove superfluous validateLine() calls in sendMail()
Client.SendMail() already calls validateLine() via Client.Mail() and
Client.Rcpt(), so there is no need to have these checks in sendMail().

Having these checks don't hurt as such, but looking at just the
sendMail() function it's not obvious whether these checks are needed if
you want to implement your own SendMail()-type function. With this
change, you can copy/paste sendMail(), add the smtp. package selector,
and modify as needed.

Also removes a superfluous nil check as a bonus.
2025-07-08 10:43:11 +02:00
2024-04-17 12:59:18 +02:00
2016-05-18 13:55:47 +02:00
2024-03-28 16:38:02 +01:00
2025-07-06 10:21:04 +02:00
2025-03-16 15:52:03 +01:00
2025-03-16 15:52:03 +01:00
2016-11-02 11:59:59 +01:00
2025-06-26 10:18:33 +02:00
2024-07-13 15:53:29 +02:00
2025-07-06 10:21:04 +02:00
2025-07-06 10:21:04 +02:00

go-smtp

Go Reference

An ESMTP client and server library written in Go.

Features

  • ESMTP client & server implementing RFC 5321
  • Support for additional SMTP extensions such as AUTH and PIPELINING
  • UTF-8 support for subject and message
  • LMTP support

Relationship with net/smtp

The Go standard library provides a SMTP client implementation in net/smtp. However net/smtp is frozen: it's not getting any new features. go-smtp provides a server implementation and a number of client improvements.

Licence

MIT

S
Description
📤 An SMTP library for Go clients and servers
Readme MIT
1.2 MiB
Languages
Go 100%