How can I specify where bounce messages should go, if I don't want them to come back to the from/replyTO field?
Bounce messages (and other errors) are sent to the SMTP FROM (also called ENVELOPE FROM) attribute, not the MESSAGE FROM attribute, which is what is set with Message.setFrom(). You can set the SMTP FROM as follows:
Properties props = System.getProperties(); props.put("mail.smtp.from", "email@example.com");If you do not provide a value for SMTP FROM, the MESSAGE FROM value is used.
See also Sun's JavaMail FAQ.