chore(deps): bump github.com/emersion/go-smtp from 0.20.2 to 0.21.0 (#1888)
* chore(deps): bump github.com/emersion/go-smtp from 0.20.2 to 0.21.0 Bumps [github.com/emersion/go-smtp](https://github.com/emersion/go-smtp) from 0.20.2 to 0.21.0. - [Release notes](https://github.com/emersion/go-smtp/releases) - [Commits](https://github.com/emersion/go-smtp/compare/v0.20.2...v0.21.0) --- updated-dependencies: - dependency-name: github.com/emersion/go-smtp dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * fix(reporter/email): use DialStartTLS instead of StartTLS --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: MaineK00n <mainek00n.1229@gmail.com>
This commit is contained in:
		@@ -9,6 +9,7 @@ import (
 | 
			
		||||
type SMTPConf struct {
 | 
			
		||||
	SMTPAddr              string   `toml:"smtpAddr,omitempty" json:"-"`
 | 
			
		||||
	SMTPPort              string   `toml:"smtpPort,omitempty" valid:"port" json:"-"`
 | 
			
		||||
	TLSMode               string   `toml:"tlsMode,omitempty" json:"-"`
 | 
			
		||||
	TLSInsecureSkipVerify bool     `toml:"tlsInsecureSkipVerify,omitempty" json:"-"`
 | 
			
		||||
	User                  string   `toml:"user,omitempty" json:"-"`
 | 
			
		||||
	Password              string   `toml:"password,omitempty" json:"-"`
 | 
			
		||||
@@ -51,6 +52,11 @@ func (c *SMTPConf) Validate() (errs []error) {
 | 
			
		||||
	if c.SMTPPort == "" {
 | 
			
		||||
		errs = append(errs, xerrors.New("email.smtpPort must not be empty"))
 | 
			
		||||
	}
 | 
			
		||||
	switch c.TLSMode {
 | 
			
		||||
	case "", "None", "STARTTLS", "SMTPS":
 | 
			
		||||
	default:
 | 
			
		||||
		errs = append(errs, xerrors.New(`email.tlsMode accepts ["", "None", "STARTTLS", "SMTPS"]`))
 | 
			
		||||
	}
 | 
			
		||||
	if len(c.To) == 0 {
 | 
			
		||||
		errs = append(errs, xerrors.New("email.To required at least one address"))
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user