all repos — mail2 @ 22276b0bdd2c06031b56eb69820e2557a0d3b58c

fork of github.com/joegrasse/mail with some changes

Added more comments
Joe Grasse hide@my.email
Fri, 17 Mar 2017 14:16:56 -0500
commit

22276b0bdd2c06031b56eb69820e2557a0d3b58c

parent

9a4ef3d0b7c18f00d1174cc0582ffadfb4600689

1 files changed, 9 insertions(+), 1 deletions(-)

jump to
M email.goemail.go

@@ -51,8 +51,11 @@

type encryption int const ( + // EncryptionTLS sets encryption type to TLS when sending email EncryptionTLS encryption = iota + // EncryptionSSL sets encryption type to SSL when sending email EncryptionSSL + // EncryptionNone uses no encryption when sending email EncryptionNone )

@@ -65,8 +68,11 @@

type encoding int const ( + // EncodingQuotedPrintable sets the message body encoding to quoted-printable EncodingQuotedPrintable encoding = iota + // EncodingBase64 sets the message body encoding to base64 EncodingBase64 + // EncodingNone turns off encoding on the message body EncodingNone )

@@ -216,7 +222,9 @@

type priority int const ( + // PriorityHigh sets the email priority to High PriorityHigh priority = iota + // PriorityLow sets the email priority to Low PriorityLow )

@@ -569,7 +577,7 @@

// send does the low level sending of the email func send(host string, port string, from string, to []string, msg string, auth smtp.Auth, encryption encryption, config *tls.Config, connectTimeout int) error { var smtpConnectChannel chan smtpConnectErrorChannel - var c *smtp.Client = nil + var c *smtp.Client var err error // set the timeout value