Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

integrate mail server to J2ee application

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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".
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic