From 986a988c5d2a3eb45a582231630b102345bcfb4c Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Tue, 1 Oct 2024 20:44:50 +0200 Subject: [PATCH] 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. --- client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/client.go b/client.go index 5d0e797..4d1b0b1 100644 --- a/client.go +++ b/client.go @@ -578,6 +578,7 @@ func (c *Client) SetPassword(password string) { // SetSMTPAuth overrides the current SMTP AUTH type setting with the given value func (c *Client) SetSMTPAuth(authtype SMTPAuthType) { c.smtpAuthType = authtype + c.smtpAuth = nil } // SetSMTPAuthCustom overrides the current SMTP AUTH setting with the given custom smtp.Auth