mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-22 13:50:49 +01:00
Update comment in eml.go for parsing multipart messages
The comment in the eml.go file was extended to include the possibility of 'Multipart/alternative' parts. Previously, it only mentioned 'Multipart/related' parts. The actual code functionality remains unchanged, this is purely a clarification in the documentation.
This commit is contained in:
parent
fcc5209852
commit
0bf3f73e9b
1 changed files with 1 additions and 1 deletions
2
eml.go
2
eml.go
|
@ -253,7 +253,7 @@ ReadNextPart:
|
||||||
return fmt.Errorf("failed to get next part of multipart message: %w", err)
|
return fmt.Errorf("failed to get next part of multipart message: %w", err)
|
||||||
}
|
}
|
||||||
for err == nil {
|
for err == nil {
|
||||||
// Multipart/related parts need to be parsed seperately
|
// Multipart/related and Multipart/alternative parts need to be parsed seperately
|
||||||
if contentTypeSlice, ok := multiPart.Header[HeaderContentType.String()]; ok && len(contentTypeSlice) == 1 {
|
if contentTypeSlice, ok := multiPart.Header[HeaderContentType.String()]; ok && len(contentTypeSlice) == 1 {
|
||||||
contentType, _ := parseMultiPartHeader(contentTypeSlice[0])
|
contentType, _ := parseMultiPartHeader(contentTypeSlice[0])
|
||||||
fmt.Printf("CONTENT-TYPE: %s\n", contentType)
|
fmt.Printf("CONTENT-TYPE: %s\n", contentType)
|
||||||
|
|
Loading…
Reference in a new issue