...

/

Sending Mails with SMTP

Sending Mails with SMTP

This lesson explains how Go code can be used to send an email using an SMTP server.

We'll cover the following...

Overview of SMTP in Go #

The package net/smtp implements the Simple Mail Transfer Protocol for sending mail. It contains a Client type that represents a client connection to an SMTP server:

  • Dial returns a new Client connected to an SMTP server.
  • Set Mail (=from) and Rcpt(= to)
  • Data returns a writer that can be used to
...
svg viewer