Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

JavaMail API vs Spring-boot-starter-mail dependency?

 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I would like some clarification about JavaMali API and dependency in Spring Boot.

Story goes like this, our professor gave us a project to build an email messaging system, where the client would be Android app (which will communicate with back-end using Retrofit2 library) and back-end will be in Spring Boot with Hibernate. Here is the small part of UML, just to give you a better understanding about idea.

Also professor told us to use https://javaee.github.io/javamail/. I just downloaded the https://javaee.github.io/javamail/docs/JavaMail-1.6.pdf, I'm not sure if it is going to be useful in order to be able to use classes, interfaces and functionalities. Now, what I don't understand is, whether the JavaMali API is just jar/dependency with concrete classes to be used or Spring Boot's spring-boot-starter-mail provides us with implementation with JavaMali API? If I can make an analogy with JPA and Hibernate, JPA is a standard and Hibernateis just implementation of that standard? In simple words, if I add mentioned dependency, am I good to go?

One more thing, I really have no idea what are these five fields means: smtpAddress smtpPort inServerType inServerAddress inServerPort. I looked couple of YT tutorials but they only set (in application.properties) values for smtpPort and smtpAddress, like they are hard-coded. For example, in one of tutorials in application.properties, there is following code:



What if I want to register new User with yahoo email, or some other email, or to create new email, how to set above mentioned fields?  

How to (or should I) make them individual for each user? And in which way they interact with other fields?

P.S. I get that these are all questions for professor or TA's, but trust me they are as****s, and they will just tell you: manage it yourself...So I sincerely hope that here there are good people willing to at least give some foundation on top of which to build up. Thank you.  
UML.png
[Thumbnail for UML.png]
 
Sheriff
Posts: 21919
106
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Mike Gosling wrote:Also professor told us to use https://javaee.github.io/javamail/. I just downloaded the https://javaee.github.io/javamail/docs/JavaMail-1.6.pdf, I'm not sure if it is going to be useful in order to be able to use classes, interfaces and functionalities. Now, what I don't understand is, whether the JavaMali API is just jar/dependency with concrete classes to be used or Spring Boot's spring-boot-starter-mail provides us with implementation with JavaMali API? If I can make an analogy with JPA and Hibernate, JPA is a standard and Hibernateis just implementation of that standard? In simple words, if I add mentioned dependency, am I good to go?


Take a look at https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-mail/2.2.6.RELEASE. It shows the dependencies at the bottom. One of those is com.sun.mail:jakarta.mail. In the 2.1.13.RELEASE version that dependency was still com.sun.mail:javax.mail. That's because, as most (if not all) JEE components, JavaMail has been moved to Jakarta.

One more thing, I really have no idea what are these five fields means: smtpAddress smtpPort inServerType inServerAddress inServerPort.


The SMTP port and address are the port and hostname of the SMTP server. That's the part that will be sending your emails. I'm guessing that the others are for reading, and that the type can be POP3 or IMAP. However, that's just a guess, and you really need to ask your TA's, to at least give example settings, because this way it's really impossible to tell.
 
I think he's gonna try to grab my monkey. Do we have a monkey outfit for this tiny ad?
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic