44 |
|
String response = socketIn.readLine(); |
45 |
|
if(response.startsWith("220")) { |
46 |
|
status = "0"; |
47 |
< |
message = "Header received from server"; |
47 |
> |
message = "Good Header received: "+response; |
48 |
|
} |
49 |
|
else { |
50 |
|
status = "1"; |
51 |
< |
message = "Service did not return a 220 response"; |
51 |
> |
message = "Bad Header received: "+response; |
52 |
|
} |
53 |
|
socketIn.close(); |
54 |
|
socket.close(); |
55 |
|
} catch (Exception e) { |
56 |
< |
status = "0"; |
57 |
< |
message = "Service check failed to establish connection to host:" + e.getMessage(); |
56 |
> |
status = "1"; |
57 |
> |
message = "Service check failed to establish connection to host: " + e.getMessage(); |
58 |
|
} |
59 |
|
// send the results back |
60 |
|
return "<SMTP status=\"" + status + "\" message=\"" + message + "\"></SMTP>"; |