update go-email version

Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
Ronni Skansing
2025-11-05 18:36:21 +01:00
parent 6dfb3c8e2c
commit ab39836e79
5 changed files with 13 additions and 9 deletions

View File

@@ -11,4 +11,4 @@ package mail
// VERSION indicates the current version of the package. It is also attached to the default user
// agent string.
const VERSION = "0.7.1"
const VERSION = "0.7.2"

View File

@@ -1496,9 +1496,9 @@ func (m *Msg) GetSender(useFullAddr bool) (string, error) {
}
}
addr := from[0]
addr := *from[0]
if !useFullAddr {
addr.Name = ""
return mailAddressStringWithoutName(addr), nil
}
return addr.String(), nil
}
@@ -1524,8 +1524,7 @@ func (m *Msg) GetRecipients() ([]string, error) {
continue
}
for _, r := range addresses {
r.Name = ""
rcpts = append(rcpts, r.String())
rcpts = append(rcpts, mailAddressStringWithoutName(*r))
}
}
if len(rcpts) <= 0 {
@@ -3327,3 +3326,8 @@ func writeFuncFromBuffer(buffer *bytes.Buffer) func(io.Writer) (int64, error) {
}
return writeFunc
}
func mailAddressStringWithoutName(addr mail.Address) string {
addr.Name = ""
return addr.String()
}

View File

@@ -288,7 +288,7 @@ github.com/twitchyliquid64/golang-asm/unsafeheader
# github.com/ugorji/go/codec v1.2.12
## explicit; go 1.11
github.com/ugorji/go/codec
# github.com/wneessen/go-mail v0.7.1
# github.com/wneessen/go-mail v0.7.2
## explicit; go 1.24.0
github.com/wneessen/go-mail
github.com/wneessen/go-mail/internal/pkcs7