DebugFile.incIdent();
}
int iAffected = 0;
DispositionNotification oRpt = (DispositionNotification) oCnt.getReport();
InternetHeaders oInetHdrs = oRpt.getNotifications();
String sHeader = oInetHdrs.getHeader("Disposition", null);
if (DebugFile.trace) DebugFile.writeln("Disposition: "+sHeader);
if (sHeader!=null) {
if (sHeader.endsWith("displayed")) {
String sSQL = "UPDATE "+DB.k_inet_addrs+ " SET "+DB.dt_displayed+"=";
PreparedStatement oUpdt = oCon.prepareStatement("UPDATE "+DB.k_inet_addrs+ " SET "+DB.dt_displayed+"=?,"+DB.user_agent+"=? WHERE "+DB.id_message+"=? AND "+DB.tx_email+"=?");
Timestamp oTs = new Timestamp(new Date().getTime());
oUpdt.setTimestamp(1, oTs);
sSQL+=oTs.toString()+","+DB.user_agent+"=";
sHeader = oInetHdrs.getHeader("Reporting-UA", null);
if (null==sHeader) {
sSQL+="null";
oUpdt.setNull(2, Types.VARCHAR);
} else {
sSQL+="'"+Gadgets.left(sHeader, 254)+"'";
oUpdt.setString(2, Gadgets.left(sHeader, 254));
}
String sMsgId = oInetHdrs.getHeader("Original-Message-ID",null);
sSQL+=" WHERE "+DB.id_message+"='"+sMsgId+"' AND ";
oUpdt.setString(3, sMsgId);
String sTxEmail = oInetHdrs.getHeader("Final-Recipient", null);
if (sTxEmail.indexOf(';')>0)
sTxEmail = Gadgets.split2(sTxEmail,';')[1];
sSQL+=DB.tx_email+"='"+sTxEmail+"'";
oUpdt.setString(4, sTxEmail);
if (DebugFile.trace) {