Skip to content

Commit ac7eeb4

Browse files
committed
[bugfix] Be polite and tell the SMTP server that we are finished
1 parent f8f55e1 commit ac7eeb4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,10 @@ private boolean[] sendBySMTP(final Mail[] mails, final String smtpServerArg, fin
344344
sendMailResults[i] = mailResult;
345345
}
346346

347+
//all done, time to "QUIT"
348+
smtpOut.print("QUIT\r\n");
349+
smtpOut.flush();
350+
347351
} catch (final IOException ioe) {
348352
LOGGER.error(ioe.getMessage(), ioe);
349353
throw new SMTPException(ioe);

0 commit comments

Comments
 (0)