1
2
3
4
5
6
7
8
9
10
11
12
13 package org.abstracthorizon.mercury.smtp.command;
14
15 import java.io.IOException;
16
17 import org.abstracthorizon.mercury.common.command.CommandException;
18 import org.abstracthorizon.mercury.smtp.SMTPResponses;
19 import org.abstracthorizon.mercury.smtp.SMTPSession;
20 import org.abstracthorizon.mercury.smtp.exception.ParserException;
21
22
23
24
25
26
27 public class QuitCommand extends SMTPCommand {
28
29
30
31
32 public QuitCommand() {
33 super();
34 }
35
36
37
38
39
40
41
42
43 protected void execute(SMTPSession connection) throws CommandException, IOException, ParserException {
44 connection.getScanner().check_eol();
45 connection.sendResponse(SMTPResponses.QUIT_RESPONSE);
46 connection.close();
47 }
48 }