mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-22 13:50:49 +01:00
Reset SMTP auth when setting SMTP auth type
This change ensures that the smtpAuth field is reset to nil whenever the SMTP auth type is updated. This prevents potential issues with mismatched authentication settings.
This commit is contained in:
parent
f823112a4d
commit
986a988c5d
1 changed files with 1 additions and 0 deletions
|
@ -578,6 +578,7 @@ func (c *Client) SetPassword(password string) {
|
||||||
// SetSMTPAuth overrides the current SMTP AUTH type setting with the given value
|
// SetSMTPAuth overrides the current SMTP AUTH type setting with the given value
|
||||||
func (c *Client) SetSMTPAuth(authtype SMTPAuthType) {
|
func (c *Client) SetSMTPAuth(authtype SMTPAuthType) {
|
||||||
c.smtpAuthType = authtype
|
c.smtpAuthType = authtype
|
||||||
|
c.smtpAuth = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetSMTPAuthCustom overrides the current SMTP AUTH setting with the given custom smtp.Auth
|
// SetSMTPAuthCustom overrides the current SMTP AUTH setting with the given custom smtp.Auth
|
||||||
|
|
Loading…
Reference in a new issue