Skip to content
The Mail Service exposes a RESTful API, developed with Spring Boot, for sending emails. The service is configurable via a properties file to allow for customizing configuration including SMTP mail properties. The project also leverages Thymeleaf Template engine for defining HTML email templates.
JavaScript Java HTML CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
pom.xml

README.md

Project Setup

###Setting up the Environment### In order to run the project you need:

  • JAVA 1.7
  • MAVEN 3.0+

###Running through MAVEN Command Line### To run the project use command

  • mvn spring-boot:run

Explore Mail API and then click on "List Operations". And it will give you all details & save your time from looking into code to find details of API! (Please note you can't Try Out as there is no real backend available)

To run the test cases use command

  • mvn clean test All tests use mocked Repositories. Both unit & integration tests have been written.

###Sender Email Settings###

Please ensure to provide valid settings for the sender email address in the file application.properties

###Project Structure###

  1. src/main/java/com/aurora/mail/api : REST controller and the entry point
  2. src/main/java/com/aurora/mail/beans : Beans
  3. src/main/java/com/aurora/mail/config : Java based configurations
  4. src/main/java/com/aurora/mail/repository : Dummy repositories which will be replaced with real ones.
  5. src/main/java/com/aurora/mail/service : Granular infrastructure services to send emails
  6. src/main/resource/mails : Email templates
  7. src/main/resource/i18n : I18N files
  8. src/main/resource/application.properties : Externalized properties for mail settings, logging, etc.
  9. src/main/resource/logback.xml : Specify loggers.

###Log Files!###

Log files can be accessed here: logs/mail.log

###Running in IDE (Optional)###

  • Setup IntelliJ
  • Open IntelliJ
  • Go to File->Open and select the pom file
  • Further actions (like running the test cases) can be performed using the IDE controls

###Salient Features###

  • All Java based configurations
  • Async Emails
  • i18n: Internationalization to support different languages.
  • Spring-Boot
  • Embedded Tomcat
  • SFL4J with LogBack for logging

###API / Libraries###

Flying Saucer is a pure java library that takes XML or XHTML and applies CSS 2.1-compliant stylesheets to it, in order to render to PDF (via iText), images, and on-screen using Swing or SWT. The library implements (basically) the entirety of CSS 2.1 and aims to be fully compliant with the W3C specification; it includes a small handful of CSS 3 features.

Thymeleaf Thymeleaf is a Java library. It is an XML / XHTML / HTML5 template engine (extensible to other formats) that can work both in web and non-web environments. It is better suited for serving XHTML/HTML5 at the view layer of web applications, but it can process any XML file even in offline environments.

logback Logging API.

Mockito Mockito is a mocking framework that tastes really good. It lets you write beautiful tests with clean & simple API.

JUnit JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks.

Wiser Wiser is a simple SMTP server that you can use for unit testing applications that send mail.

Swagger The goal of Swagger is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection.

Swagger-UI is a good-looking JavaScript client for Swagger's JSON.

You can’t perform that action at this time.