I'm trying to create simple mail application using JavaMail API But I've encounter some problems
What I want to do is: Having three mails mailA, mailB, mailC then sending mail from mailB to mailC and if the mailC dos not exist(invalid mail) the failed email notification to be return to mailA
But the behavior that I'm getting is: The failed email notification is return to the sender mailB anyway what I do
I've tried some potential solutions for example setting: mimeMessage.setFrom("mailB"); mimeMessage.addRecipients("mailC"); mimeMessage.setReplyTo("mailA"); mimeMessage.setSender("mailA"); but no luck
If you have some suggestion please write!