• Post Reply Bookmark Topic Watch Topic
  • New Topic

integrate mail server to J2ee application

 
Rakesh Shah
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

How is it possible to integrate mail server into the j2ee application. i mean the client should be able to mail using that mail server. and the address also should be changes accordingly rather than 127.0.0.9 or some some sort of ip.
can somebosy please help me out with this and als suggest which is a good mail server for windows platform
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java can you use any mail server using the JavaMail API (which supports the SMTP, POP3 and IMAP protocols). To make a mail server the default for a particular domain is a matter of setting up DNS accordingly; that's outside the realm of Java. You need to talk to the network admin about that.

You can find any number of free and commercial email servers by googling for "windows email server".
 
Bear Giles
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can integrate it into your j2ee server once you have identified an external mail server.

First tell your app server about the mail server. In tomcat's META-INF/context.xml file:



Then tell your application about the JNDI resource on the app server. In web.xml:



You can then access the mail session via JNDI. Here we usually just set it up with spring injection.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!