Skip to content

Commit d25791e

Browse files
committed
[bugfix] Fix separation of multipart parts in email
1 parent 1659221 commit d25791e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

extensions/modules/mail/src/main/java/org/exist/xquery/modules/mail/SendEmailFunction.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,13 +508,14 @@ static void writeMessage(final PrintWriter out, final Mail aMail, final boolean
508508
//Mime warning
509509
out.print(eol);
510510
out.print(ERROR_MSG_NON_MIME_CLIENT + eol);
511+
out.print(eol);
511512

512513
out.print("--" + multipartBoundary + eol);
513514
}
514515

515-
// TODO - need to put out a multipart/mixed boundary here when HTML, text and attachment present
516516
if (nonEmpty(aMail.getText()) && nonEmpty(aMail.getXHTML()) && aMail.attachmentIterator().hasNext()) {
517517
out.print("Content-Type: multipart/alternative; boundary=" + parameterValue(multipartBoundary(1) + "_alt") + eol);
518+
out.print(eol);
518519
out.print("--" + multipartBoundary(1) + "_alt" + eol);
519520
}
520521

0 commit comments

Comments
 (0)