From 7bddd9168ef84f8c6d129a866a025f6bf0b38458 Mon Sep 17 00:00:00 2001 From: Santiago De la Cruz Date: Tue, 6 Jul 2021 22:07:39 -0400 Subject: [PATCH] Export AuthType Fix #40 --- email.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/email.go b/email.go index bdf15ee..ec5c58b 100644 --- a/email.go +++ b/email.go @@ -34,7 +34,7 @@ SMTPServer represents a SMTP Server If authentication is CRAM-MD5 then the Password is the Secret */ type SMTPServer struct { - Authentication authType + Authentication AuthType Encryption Encryption Username string Password string @@ -117,11 +117,11 @@ func (contentType contentType) string() string { return contentTypes[contentType] } -type authType int +type AuthType int const ( // AuthPlain implements the PLAIN authentication - AuthPlain authType = iota + AuthPlain AuthType = iota // AuthLogin implements the LOGIN authentication AuthLogin // AuthCRAMMD5 implements the CRAM-MD5 authentication @@ -651,7 +651,7 @@ func dial(host string, port string, encryption Encryption, config *tls.Config) ( // smtpConnect connects to the smtp server and starts TLS and passes auth // if necessary -func smtpConnect(host, port, helo string, a auth, at authType, encryption Encryption, config *tls.Config) (*smtpClient, error) { +func smtpConnect(host, port, helo string, a auth, at AuthType, encryption Encryption, config *tls.Config) (*smtpClient, error) { // connect to the mail server c, err := dial(host, port, encryption, config)