mhale / smtpd

An SMTP server package written in Go, in the style of the built-in HTTP server.
The Unlicense
397 stars 92 forks source link

how to send email? #32

Open li-xunhuan opened 3 years ago

wraix commented 1 year ago

You connect with an SMTP client and follow the protocol. I use Mutt.

adrian-badulescu commented 1 year ago

Actually this is a good question as the documentation lacks clarity, meaning the handler could be more explicit, in this form is unusable func rcptHandler(remoteAddr net.Addr, from string, to string) bool { domain = getDomain(to) return domain == "mail.example.com" }

Fedasov commented 3 months ago

Hello, I also faced such a problem. I can't send the message. Writes panic: unencrypted connection. Although our mail service is based on https. Please tell me where I made a mistake?

mhale commented 2 months ago

This library is for receiving email, not sending email. For sending email, you might have more success with net/smtp.