Reputation: 923
So the question I have is one regarding JavaMail. I want to send an email to different email addresses, but I want the sender to be something like "noreply". However, I can't seem to do this because JavaMail needs an actual email address on both, the sender and the receiver, for it to work.
I could create my own domain and SMTP, but that seems annoying. Anybody have any suggestions? Thanks in advance.
Upvotes: 0
Views: 5058
Reputation: 22158
If the SMTP server does not do any checks itself (such as checking that the From address you are sending from actually exists and matches the domain name) JavaMail allows you to put whatever address you want. If your SMTP server allows it you can even spoof email addresses of other people easily. So you could set your From
field to [email protected]
if you want without problems.
Just set it to [email protected]
to test it out. However you should put a good domain otherwise your emails might get marked as spam by spam filters. Showing the recipients where the email is actually coming from is also a good idea!
Upvotes: 5