Skip to content

Commit

Permalink
Merge pull request #413 from wneessen/bug/412_multipart-newline-regre…
Browse files Browse the repository at this point in the history
…ssion

Fix regression in multipart boundary writing
  • Loading branch information
wneessen authored Jan 12, 2025
2 parents fb1abbd + c6d85fe commit a2c430d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions msgwriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,19 @@ func (mw *msgWriter) writeMsg(msg *Msg) {
}
if msg.hasMixed() {
mw.startMP(MIMEMixed, msg.boundary)
if mw.depth == 0 || (msg.hasSMIME() && mw.depth == 1) {
if mw.depth == 1 {
mw.writeString(DoubleNewLine)
}
}
if msg.hasRelated() {
mw.startMP(MIMERelated, msg.boundary)
if mw.depth == 0 || (msg.hasSMIME() && mw.depth == 1) {
if mw.depth == 1 {
mw.writeString(DoubleNewLine)
}
}
if msg.hasAlt() {
mw.startMP(MIMEAlternative, msg.boundary)
if mw.depth == 0 || (msg.hasSMIME() && mw.depth == 1) {
if mw.depth == 1 {
mw.writeString(DoubleNewLine)
}
}
Expand Down

0 comments on commit a2c430d

Please sign in to comment.