Reputation: 112
How to send a mail from non existing mail? Example: [email protected] using Spring Mail Sender Configuration. A mail doesn't exists so that reply to email address should fail.
Solution with java mail also preferred.
I tried with this too. It is not working with spring framework. (Unknown Sender) when sending email with pdf attachment created in iText from java application
Upvotes: 0
Views: 2946
Reputation: 31841
If you're not using SMTP authentication then it doesn't matter whether the email exists or not.
You can send email from addresses that doesn't exist without using SMTP authentication but that's usually a bad practice because such email's are usually evaluated as spam by most of the spam filters.
See this answer for more details.
Hence it's best practice to send email using SMTP authentication. But when sending email using that way you should have all credentials like email, password, outgoing server, port etc... and so you'll need a email that does exists.
Upvotes: 2