File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Restricting mails to a particular domain  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Restricting mails to a particular domain  " Watch "Restricting mails to a particular domain  " New topic
Author

Restricting mails to a particular domain

Pradeep Kumar T
Greenhorn

Joined: Apr 14, 2007
Posts: 12
Hello,

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 "abc@mycompany.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?

Please help.

Thanks in advance.

Pradeep
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42932
    
  68
It sounds like a simple test of whether the email address ends with "@mycompany.com" should suffice, no?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Restricting mails to a particular domain