Just curious as to why you might want to wrap this in a transaction.
By default, with POP3 servers, when you download messages, they will not
be deleted from the server until the command is given from the client. In
other words, if you attempt to D/L you mail from a POP3 server the
connection craps out before all the mail is D/L, the messages that you
have D/L thus far, are still on the server.
Therefore, in your app, you can verify that you have all of the mail D/L
according to the headers etc that you queried from the server. When that
is verified, then you can send the delete command to the server from your
app.