Skip to content

Commit

Permalink
Export AuthType
Browse files Browse the repository at this point in the history
Fix #40
  • Loading branch information
xhit committed Jul 7, 2021
1 parent 3776dc6 commit 7bddd91
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions email.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 7bddd91

Please sign in to comment.