Paul Clapham wrote:You should also check out the "mail.smtp.from" property (documented here).
Paul Clapham wrote:Did you use the "setReplyTo" method of Message?
Also, you don't seem to understand how e-mail works. You give the message to your server -- that's what the "send" message does. Your server will then try to find the server for each of the "to" addresses on the message and give the message to those servers. However since any of those servers may be down at the time, your server will try for perhaps a couple of days before it gives up and deems the message to be undeliverable.
Naturally your JavaMail code doesn't wait for that to happen, it just gives the message to the server and returns. Similarly the other server, the one which your server decided belonged to one of the "to" addresses, may also tell you that it can't deliver the message. That may be because there is no such address on that server, or because that address's mailbox is full, or because it thinks your message is spam. That also happens later. The other server may send a return e-mail saying your message was undeliverable, or it may just discard the message silently.
As for the Delivery Status Reports, you can ask for one but the receiving server is not obliged to send you one.
Mark Spritzler wrote:Well, you just add the association mapping to your mapping.
See the Hibernate documentation for xml mapping of associations here
I am also going to move this to the ORM forum as this isn't a Spring question. Thanks