protected final void sendSigned(String contents, PrintWriter output) throws IOException, GeneralSecurityException {
if (k == null || c == null) {
- output.println("Content-Transfer-Encoding: base64");
- output.println();
+ output.print("Content-Transfer-Encoding: base64\r\n\r\n");
output.print(contents);
} else {
SMIME.smime(contents, k, c, output);
continue;
}
- try (GigiPreparedStatement statmt = new GigiPreparedStatement("INSERT INTO `emailPinglog` SET `when`=NOW(), `email`=?, `result`=?, `uid`=?, `type`='fast', `status`=?::`pingState`")) {
+ try (GigiPreparedStatement statmt = new GigiPreparedStatement("INSERT INTO `emailPinglog` SET `when`=NOW(), `email`=?, `result`=?, `uid`=?, `type`='fast', `status`='success'::`pingState`")) {
statmt.setString(1, address);
statmt.setString(2, line);
statmt.setInt(3, forUid);
- statmt.setString(4, "success");
statmt.execute();
}
}
}
- try (GigiPreparedStatement statmt = new GigiPreparedStatement("INSERT INTO `emailPinglog` SET `when`=NOW(), `email`=?, `result`=?, `uid`=?, `type`='fast', `status`=?::`pingState`")) {
+ try (GigiPreparedStatement statmt = new GigiPreparedStatement("INSERT INTO `emailPinglog` SET `when`=NOW(), `email`=?, `result`=?, `uid`=?, `type`='fast'::`emailPingType`, `status`='failed'::`pingState`")) {
statmt.setString(1, address);
statmt.setString(2, "Failed to make a connection to the mail server");
statmt.setInt(3, forUid);
- statmt.setString(4, "failed");
statmt.execute();
}
return FAIL;