if (is != null)
{
// ps.executeUpdate();
log.info("sure");
EmailInbox emailInbox = new EmailInbox();
emailInbox.setMessageId(messageid);
emailInbox.setReadflag(0);
emailInbox.setFilename(filename);
byte[] b = new byte[size];
int bytes = is.read(b);
while (bytes != -1)
{
bytes = is.read(b);
}
emailInbox.setAttachment(b);
EmailInboxPeer.doInsert(emailInbox);
} else
{
//EmailInboxPeer.executeStatement(sql);
EmailInbox emailInbox = new EmailInbox();
emailInbox.setMessageId(messageid);
emailInbox.setReadflag(0);
EmailInboxPeer.doInsert(emailInbox);
}
//ps.close();
} //if email doesnt exist