Skip to content
Advertisement

Setting the Bounce Address in Apache Commons Mail

Using the Apache Commons to send email there is the following code.

JavaScript

But the bounce will not work. It sends the bounce to the party that authenticated the message, which in this example is SMTP_AUTH_USER. So How can I get it to bounce properly?

Advertisement

Answer

Did you check with a packet sniffer what is actually going over the wire? I wouldn’t be surprised if the MSA on SMPT_HOST_NAME ignores and overrides your bounce address.

You could try using the SMTP-port to the MTA and quickly check if this makes a difference.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement