No native SMTP server functionality in Golang?

We have the net/http package and I see there’s a net/smtp package, but this appears to be only a SMTP client. Is there no native SMTP server that can be spun up to send emails?

Regards,
Steven

The SMTP client is for sending email. An SMTP server receives email (although it may of course send them onwards again after that).

An SMTP server is also a huge undertaking for a large number of reasons, many of which are related to spam and abuse. There is no SMTP server in the standard library.

Generally speaking, you do not want an SMTP server. If you actually do, install one of the available, well regarded ones. You definitely do not want to build an SMTP server.

2 Likes

To piggy back on this, building an SMTP server is also a very rare undertaking.

Nearly everyone who uses Go will build a web server of some sort at some point. Nearly nobody using Go will build an SMTP server ever. As a result the former makes sense in the std library, but the latter does not.

2 Likes

agree with Jon and here is a few SMTP servers in Go for hipsters))




1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.