The sender is an envelope email address (mailbox) that:
The sender is also known as:
The value is generally the author (ie the address in the from header) but in other cases such as a mailing list, it may be not.
[email protected]
[email protected]
If there are multiple relays, the original sender can be found in the Return-Path header.
In a SMTP transaction, the sender should conform to the Sender Policy Framework (SPF)
You set the bounce with the mail.smtp.host property
Properties props = new Properties();
props.put("mail.smtp.host", "my-mail-server");
Session session = Session.getInstance(props, null);