I am using JavaMail API and have a small requirement. I have to restrict my outgoing mails to only to a particular domain. I mean the mails that i send should go successfully only if the domain is "email@example.com..Even if the users of my application types someother domain like yahoo.com or anything else, the mails shouldn't go. I want to restrict the users to send mails to only our company domain. Is that possible, any method available to set it so?
Thanks in advance.
posted 8 years ago
It sounds like a simple test of whether the email address ends with "@mycompany.com" should suffice, no?