Code Monkey home page Code Monkey logo

fake-smtp-server's Introduction

Fake SMTP Server

Build Status Quality Gate Status

Simple SMTP Server which stores all received emails in an in-memory database and renders the emails in a web interface

Introduction

The Fake SMTP Server is a simple SMTP server which is designed for development purposes. The server collects all received emails, stores the emails in an in-memory database and provides access to the emails via a web interface.

There is no POP3 or IMAP interface included by intention. The basic idea of this software is that it is used during development to configure the server as target mail server. Instead of sending the emails to a real SMTP server which would forward the mails to the target recipient or return with mail undelivery for test email addresses (e.g. @example.com) the server just accepts all mails, stores them in the database so that they can be rendered in the UI. This allows you to use any test mail address and check the sent email in the web application of the Fake SMTP Server.

The server store a configurable maximum number of emails. If the maximum number of emails is exceeded old emails will be deleted to avoid that the system consumes too much memory.

The server is also provided as docker image on docker hub gessnerfl/fake-smtp-server. To change configuration parameters the corresponding configuration values have to be specified as environment variables for the docker container. For details check the Spring Boot (http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-external-config) and docker documentation (https://docs.docker.com/engine/reference/run/#env-environment-variables).

Running Fake SMTP Server locally

Note

Starting with version 2.2.0 Java 21 is required to run Fake SMTP Server.

Note

Starting with version 2.0.0 Java 17 is required to run Fake SMTP Server.

Run from released JAR files

  1. Download the latest fake-smtp-server-<version>.jar from https://github.com/gessnerfl/fake-smtp-server/releases/latest
  2. Copy the file into the desired target folder
  3. Execute the following command from the folder where the JAR file is located:
java -jar fake-smtp-server-<version>.jar

Run from sources

In order to run this application locally from sources, execute:

./gradlew bootRun

Afterwards, the web interface is be availabe under http://localhost:8080.

Configuration

As the application is based on Spring Boot the same rules applies to the configuration as described in the Spring Boot Documentation (http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-external-config).

The configuration file application.yaml can be placed next to the application jar, in a sub-directory config or in any other location when specifying the location with the parameter -Dspring.config.location=<path to config file>.

All configuration parameters can also be passed as environment variables using uppercase characters and underscores as separators such as SERVER_PORT or MANAGEMENT_SERVER_PORT.

The following paragraphs describe the application specific resp. pre-defined configuration parameters.

Fake SMTP Server

The following snippet shows the configuration of a fake smtp server with its default values.

fakesmtp:
  #The SMTP Server Port used by the Fake SMTP Server
  port: 8025

  #The binding address of the Fake SMTP Server; Bound to all interfaces by default / no value
  bindAddress: 127.0.0.1

  #List of recipient addresses which should be blocked/rejected
  blockedRecipientAddresses:
    - [email protected]
    - [email protected]

  #List of sender email addresses to ignore, as a comma-separated list of regex expressions.
  filteredEmailRegexList: john@doe\\.com,.*@google\\.com ; empty by default

  #Optional configuration option to specify the maximum allowed message size. The size can be 
  #defined using Spring Boot DataSize value type - https://docs.spring.io/spring-boot/docs/2.1.9.RELEASE/reference/html/boot-features-external-config.html#boot-features-external-config-conversion-datasize.
  #Default: no limit
  maxMessageSize: 10MB

  #Configure if TLS is required to connect to the SMTP server. Defaults to false. See TLS section below
  requireTLS: false

  #When set to true emails will be forwarded to a configured target email system. Therefore
  #the spring boot mail system needs to be configured. See also 
  # https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-email
  forwardEmails: false

Authentication

Optionally authentication can be turned on. Configuring authentication does not mean the authentication is enforced. It just allows you to test PLAIN and LOGIN SMTP Authentication against the server instance.

fakesmtp:
  authentication:
    #Username of the client to be authenticated
    username: myuser
    #Password of the client to be authenticated
    password: mysecretpassword 

TLS

Optionally TLS can be activated. To configure TLS support, a trust store needs to be provided containing the TLS certificate used by the FakeSMTP Server.

fakesmtp:
  # true when TLS is mandatory otherwise TLS is optional
  requireTLS: true
  #configuration of the truststore to enable support for TLS.
  tlsKeystore:
    location: /path/to/truststore.p12
    password: changeit
    type: PKCS12 # or JKS

Data Retention Settings

Emails

To keep memory resources under control, there is a parallel process that deletes the oldest emails considering the maximum number of emails to retain and the time span to periodically recheck this maximum number of emails, controlling also the initial time to wait to start this parallel process. The default values are:

  • maxNumberEmails: 100
  • fixedDelay: 300000 # 5 minutes
  • initialDelay: 60000 # 1 minute
fakesmtp:
  persistence:
    maxNumberEmails:
      emails:
        #max numbers of most recent emails to retain and not deleted by the parallel process
        maxNumberEmails: 10
        # configuration settings of the background process (timer) responsible to delete the oldest emails
        emailDataRetentionTimer:
          #each 5 minutes from 'initialDelay' (see below), the parallel process will check if the deletion is necessary
          fixedDelay: 300000
          #each 'initialDelay' (see above)  after 2 minutes from the start, the parallel process will start checking if the deletion is necessary
          initialDelay: 120000

Web UI

The following snippet shows the pre-defined web application configuration

#Port of the web interface
server:
  port: 8080

#Port of the http management api
management:
  server:
    port: 8081 

REST API

Documentation of exposed services is available at:

localhost:8080/swagger-ui.html

Developpment Environment

This requires to have docker installed. If you need to implement a new feature, you will probably need an correct JDK version setup in an environement.

sh/dev

Then, in the dev container started by the command above, you can use various commands. The following commands should be the most common ones:

sh gradlew test
sh gradlew test --tests '*EmailRepositoryIntegration*' --info
sh gradlew build

Run UI & Backend tests

sh/test

Build UI & Backend

sh/build

Run app (UI & Backend)

sh/run

Build & Push a new development docker image

To update/change the development image, update the dev.Dockerfile, dont forget to change the version in the dev-image-tag file and edit the registery if needed.

sh/push-dev-image

fake-smtp-server's People

Contributors

adrianbartnik avatar cmaggiulli avatar dependabot[bot] avatar etidahouse avatar fejfarkamil avatar fracz avatar gessnerfl avatar gwallet avatar mnylen avatar msg-gregor avatar radizd avatar sergiogragera avatar smuda avatar synox avatar vilherda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fake-smtp-server's Issues

Management API does not find any Mails

When running the FakeSMTP, receiving mails via WebUI works like a charm. However, when I check http://localhost:5081 I only get this:

{
  "timestamp":"2020-07-15T13:06:25.760+0000",
  "status":404,
  "error":"Not Found",
  "message":"No message available",
  "path":"/"
}

Is there something I am missing or is there a bug?

Can't delete messages when working behind reverse proxy

We run fake-smtp in docker on a devel server with public IP. We use nginx as a reverse proxy with basic auth and https enabled. Everything works fine except one problem - when user press "Delete" button, fake-smtp returns 405 error:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Wed Jun 08 07:55:20 GMT 2022
There was an unexpected error (type=Method Not Allowed, status=405).

And docker logs for this container shows an error:
WARN 7 --- [-nio-443-exec-9] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]

When fake-smtp runs locally everything works fine.
User request simulation with curl.
Behind nginx:
curl -v -d "_method=delete&_method=delete" -u "user:pass" -H "Content-Type: application/x-www-form-urlencoded" -X POST https://devel-serv/email/50
Response headers:
< HTTP/1.1 405
< Server: nginx/1.16.1
< Date: Tue, 07 Jun 2022 15:32:41 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Connection: keep-alive
< Allow: DELETE, GET

Locally:
curl -v -d "_method=delete&_method=delete" -H "Content-Type: application/x-www-form-urlencoded" -X POST http://127.0.0.1:5080/email/3
Response headers:
< HTTP/1.1 302
< Location: http://127.0.0.1:5080/email
< Content-Language: en-US
< Content-Length: 0
< Date: Tue, 07 Jun 2022 15:19:07 GMT

Nginx config:
upstream smtp {
server 127.0.0.1:8280;
keepalive 100;
}
location / {
proxy_pass_request_headers on;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass http://smtp;
auth_basic "Fake SMTP";
auth_basic_user_file /etc/nginx/auth/.htpasswd;
}

"Embedded" mode support

Would it be possible to run this embedded in an existing Spring Boot application?

Similar as one e.g. uses the embedded H2 console in development mode.
Like adding a fake-smtp-starter to a project and enable it only for de dev profile.

v1.8.0 jar seems to be missing resources for admin UI?

Just switched from using v1.7.1 to v1.8.0, and the admin UI available at localhost:8080 appears to be missing at least some of the resources.

Screenshot:
image

Inspecting in the browser shows 404s:
image

Switching back to v1.7.1 and those resources are found without issue.

Migrate to Material Design

Story

As a UX Designer
I want to migrate to material UI
To get a more modern and fresh user experience

creating JAR

How can I build an executable JAR in IntelliJ Idea? to run as java -jar .... ?
I am stuck in the screen and don't know what to specify:
image

Feature Request: Auto Refresh

Hi Gessnerfl,

I would like to suggest an auto refresh within the web UI. I referenced the "mailtrap" website

Thank you :)

Re-building fake-smtp-server in offline environment

I'm currently setting up an offline build of fake-smtp-server for use within that secured environment and I've found a few issues that is problematic. I've described what I've found so far below and if you are interested I'll create a pull request.

  1. The Dockerfile depends on the filename from the build being build/libs/fake-smtp-server-$APP_VERSION.jar but if I build in i a folder that is not named fake-smtp-server that assumption is not valid. Setting the jar baseName to fake-smtp-server works nicely though.
jar {
	baseName 'fake-smtp-server'
}
  1. Since the version is already set by you during release I needed a way to specify the version, bypassing the automatic version increment with a parameter. A small change in build.gradle that should not affect you fixes that:
project.version = findProperty 'projectVersion' ?: scmVersion.version
  1. Since docker hub is inaccessible during build, using amazoncorretto:11.0.14-alpine3.15 doesn't work so I needed a way to specify the base image. That way we could also use the internal hardened image where we have more control. When not using the build-arg argument, the default is still amazoncorretto:11.0.14-alpine3.15:
ARG BASE_IMAGE=amazoncorretto:11.0.14-alpine3.15
FROM ${BASE_IMAGE}

Managing used memory by docker container

Hi!
When limiting memory for the docker container the fake-smtp-server does not seem to adopt accordingly.

To verify, run the following command to limit the container to 512MB and print the MaxHeapSize:

docker run --rm -it -m 512M --entrypoint "java" gessnerfl/fake-smtp-server -XX:+PrintFlagsFinal -version | grep -i MaxHeapSize
    uintx MaxHeapSize                              := 788529152                           {product}

As you can see, the allocated MaxHeapSize is roughly 788 MiB, which is slightly more than the 512MB allowed.

This can be mitigated by changing the startup command such as:

docker run --rm -it -m 512M --entrypoint "java" gessnerfl/fake-smtp-server -XX:+PrintFlagsFinal -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -version | grep -i MaxHeapSize
    uintx MaxHeapSize                              := 134217728                           {product}

As you can see, the MaxHeapSize is now roughly a forth of the available memory.

According to https://blogs.oracle.com/java-platform-group/java-se-support-for-docker-cpu-and-memory-limits the UseCGroupMemoryLimitForHeap is on by default in java 8u131 and later. The current version of java in the container seems to be 1.8.0_171 so the simplest mitigation could be to simply update java in the container.

Probably a rebuild of the image would do the trick.

[feature-request] consider proxy mode

Hi,
at first thanks for this application, it helped me during development.
Would you consider functionality, where it will be possible to store mails inside fake-smtp-server as it's possible to store now and also send messages via configured smtp server? So basically fake-smtp-server will serve as some kind of proxy where it would be possible:

  • to store mails inside it
  • allow to send those mails further via configured server

thanks

Add Authentication

Story

I want to configure authentication
So that I can secure the mail server

Support for Attachments?

Is there any planned support for attachments? Right now only the source is visible, but I cannot e.g. download an attachment.

Add Data Retention

#Story
I want to be able to configure the maximum number of emails stored in the database
So that I can limit the total number of emails stored in the in-memory database

README.md issue

In the Web UI section:
#Port of the http management api
management.port=5081

I think it should be
management.server.port

UI revamp

To avoid maintenance of multiple interfaces for UI and REST and to simplify management of 3rd party libraries the Thymeleaf UI should be replaced by a React UI including React Router and Material UI.

Pagination bar is missing

When the number of emails exceeds the page size of 25 emails it is not possible to see additional emails as the pagination bar ist missing. So it is not possible to switch between pages.

Button for release/forward specific email

Sometimes testers need to check how an email will look in an actual email client.
It can be a desktop client or an online client like Gmail.
It would be helpful to have a button for each email in UI to release it (send email to the receiver as is) or forward it (send email to tester's email)

Sending css with HTML emails also affect the Fake SMTP Server's UI

We send HTML-Emails from a C# backend and discovered, that if we have any css in it, for example with the or <style> tags, that those styles also affect the UI of the Fake SMTP Server.

Here is an example:
image

The Email is a multipart (html) email, which has a <style> tag, that has the following css:

body {
  color: green;
  font-size:30px;
}

As you can see, those styles affect the GUI and not just the email content

Hope this helps,
if you need any more information, feel free to contact me :)

Providing a container build for linux/arm64 architecture

Hi there,

first of all thanks for this contribution :-) I use the fakesmtp server for my private projects here on github for a long time.
Unfortunately I just switched my notebook which is now running on an ARM cpu architecture. I could deal with it by replacing using docker desktop with colima, but this x64 emulation lacks some performance.

Would it be possible for you to provide a multi arch build for the docker container (using dockers buildx plugin), such that all ARM users will find a fit on docker hub? This would be great.

For now I will lookup a different fakesmtp on dockerhub which supports ARM as well.

THX and have a nice weekend!
Stefan

Images not shown for HTML-Template emails

We send HTML-Emails from a C# backend and discovered, that the images are not being displayed in the Fake SMTP Server's UI

This is what the emails look like in the UI:
image

This is the content of the mail-tabs-content div on the Fake SMTP Server UI:
image

As you can see, the images have a contentID, as indicated by the "cid:" in the src attribute of the image.

If i have a look at the "Raw" tab in the UI, you can see that the images are sent correctly with the email:
image

Hope this helps,
if you need any more information, feel free to contact me :)

Java 11 Migration

Migrate Fake SMTP server to java 11 to run the system on latest Java and latest Spring Boot which fixes several known vulnerabilities.

Help wanted - Spring-Boot Configuration

How should I configure

Describe :

I want to test my sending Email function, in my Spring-Boot project, I have the following configuration:

mail:
  protocol: smtp
  host: ****
  port: ****
  username: ***
  password: **
  test-connection: true
  default-encoding: utf-8

And I wan to use fake-smtp-server to test my function, should I change the Spring-Boot config ?
I Changed the host to localhost and port to 5025 and I do received Email in fake-smtp-serve. I'm wondering if I just need to change the port configuration

Ref :

The test configuration I used:

mail:
  protocol: smtp
  host: localhost
  port: 5025
  username: ***
  password: ***
  test-connection: true
  default-encoding: utf-8

management.port seems unused

This configuration

docker run -p 2525:25 -p 5080:5080 -p 5081:5081 gessnerfl/fake-smtp-server

does not allow me to connect to localhost:5081, I wanted to check out what sort of API would be exposed there. The port is listed in the README and the Dockerfile.

Authenticate does not properly authenticate

When users have .auth() or (.userName() and .password()) enabled on the @rule for the SMTP server the authentication mechanism of the mock server throws a Null Pointer Error.

Debugged it and saw that the error occurs at the following line:
if (clientInput.trim().equals(AUTH_CANCEL_COMMAND)) in the AuthCommand class returns null instead of the an empty string.

This is stopping users from properly testing the SMTP server with Authentication.

StackOverFlow Exception - Could not write JSON: Infinite Recursion

This is something that started happening recently (possibly with a recent version). I'm not entirely sure when because this runs in a container in azure and isn't restarted very often. I started getting errors performing performing API calls (connection was closed). I looked at the logs and found this error. Some emails contain images and thinking that might be related.

image

Mailsubjects with UTF-8 Characters are broken

Hi there!

1st thanks a lot for this server. I have been using it for dev purposes in some projects by now.

One of my last projects howerver is building UTF-8 Subjects, like described here:
https://stackoverflow.com/questions/20806154/php-mail-special-characters-in-subject-field

Which are displayed properly in real mail clients but are broken in fake-servers GUI.
To support aceptance tests, it would be nice if this server could handle this, too.

Cheers
Stefan

unable to execute latest jar

I used the following issue ( #41 ) to create jar file.

When I am trying to execute the created jar, it fails with the below error:

Error: Could not find or load main class fake-smtp-server-1.10.5-SNAPSHOT.jar
Caused by: java.lang.ClassNotFoundException: fake-smtp-server-1.10.5-SNAPSHOT.jar

can't seem to understand what is missing since I have tried multiple approaches suggested online for gradle and spring boot project. Any help on this one, it's blocking in creating the source code. Thanks.

CVEs found

There are currently components which (according to blackduck) has CVEs.

HIGH:

H2 Database Engine v1.4.200

I tried just upgrading to 2.1.212 but that breaks a lot of tests and will take more effort. I can create a PR if you'd like.

MEDIUM

materialize 1.0.0

This is a bit more interesting, since the last release of materialize is 1.0.0 from Sep 10, 2018. I'd say this project is abandoned and should probably be replaced.

Weird email formatting

Hi,

I am using the dockerized version of fake-smtp-server and I noticed that it has a weird text formatting when examining the email.

This is the RAW payload received by the fake smtp server:

Received: from EXAMPLE ([172.21.0.1])
        by fa452830e231
        with SMTP (SubEthaSMTP 3.1.7) id KJJXUSEC
        for [email protected];
        Tue, 05 Jan 2021 11:57:47 +0000 (GMT)
Date: Tue, 5 Jan 2021 12:57:47 +0100 (CET)
From: [email protected]
To: [email protected]
Message-ID: <467546711.2.1609847867469@MMYSLIK>
Subject: Project Test finished with result WARNING
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_0_1749930186.1609847867151"

------=_Part_0_1749930186.1609847867151
Content-Type: multipart/related; 
	boundary="----=_Part_1_1362894073.1609847867158"

------=_Part_1_1362894073.1609847867158
Content-Type: text/html;charset=UTF-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Monitoring project results</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'/>
    <!-- use the font -->
    <style>
        body {
            font-family: 'Roboto', sans-serif;
            font-size: 14px;
        }
    </style>
</head>
<body>
    <p>
        <b>Project finished: </b>
        <a href="http://localhost:8020/">Test</a>
    </p>
    <p>
        <b>Processing finished ID: </b><span>2021-01-05T11:57:39.855551Z</span>
    </p>
    <p>
        <b>Result: </b><span>WARNING</span>
    </p>

    <table>
        <thead>
            <tr>
                <th>STRUCTURE</th>
                <th>ANOMALY</th>
                <th>DQ</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>
                    <span>SKIPPED</span>
                </td>
                <td>
                    <span>SKIPPED</span>
                </td>
                <td>
                    <span>WARNING</span>
                </td>
            </tr>
        </tbody>
    </table>

</body>
</html>
------=_Part_1_1362894073.1609847867158--

------=_Part_0_1749930186.1609847867151--

And the email was displayed like this:
email

There are some additional spaces and line breaks added for no reason. Do you have any idea what might be causing this?

Impossible to delete about 5k emails with "Delete All" button

Couldn't delete about 5k emails with "Delete All". There is memory problem.

2022-06-02 12:53:03.795 [http-nio-5080-exec-3          ] WARN  o.h.e.l.i.CollectionLoadContext.cleanup:420        - HHH000160: On CollectionLoadContext#cleanup, localLoadingCollectionKeys contained [1] entries
2022-06-02 12:53:03.797 [http-nio-5080-exec-3          ] ERROR o.a.c.c.C.[.[.[.[dispatcherServlet].log:175        - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.OutOfMemoryError: Java heap space] with root cause
java.lang.OutOfMemoryError: Java heap space
	at java.base/java.util.Arrays.copyOf(Arrays.java:3745)
	at java.base/java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:211)
	at org.hibernate.type.descriptor.java.DataHelper.extractBytes(DataHelper.java:190)
	at org.hibernate.type.descriptor.java.PrimitiveByteArrayTypeDescriptor.wrap(PrimitiveByteArrayTypeDescriptor.java:120)
	at org.hibernate.type.descriptor.java.PrimitiveByteArrayTypeDescriptor.wrap(PrimitiveByteArrayTypeDescriptor.java:26)
	at org.hibernate.type.descriptor.sql.BlobTypeDescriptor$1.doExtract(BlobTypeDescriptor.java:48)
	at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:47)
	at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257)
	at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253)
	at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:243)
	at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:329)
	at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:3214)
	at org.hibernate.persister.entity.Loadable.hydrate(Loadable.java:94)
	at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.loadFromResultSet(EntityReferenceInitializerImpl.java:342)
	at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.hydrateEntityState(EntityReferenceInitializerImpl.java:269)
	at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.readRow(AbstractRowReader.java:80)
	at org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractRows(ResultSetProcessorImpl.java:157)
	at org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:94)
	at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:105)
	at org.hibernate.loader.collection.plan.AbstractLoadPlanBasedCollectionInitializer.initialize(AbstractLoadPlanBasedCollectionInitializer.java:87)
	at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:710)
	at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:76)
	at org.hibernate.internal.SessionImpl$$Lambda$1473/0x0000000100b39040.accept(Unknown Source)
	at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
	at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:2217)
	at org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:595)
	at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:264)
	at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:591)
	at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:149)
	at org.hibernate.collection.internal.PersistentBag.iterator(PersistentBag.java:387)
	at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.java:263)
	at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.java:253)

log4j status

Hi,

I'm browsing all our dependencies for Java projects due to the log4j exploit. I could not find any hints you may be using log4j, but could you give a short stateement on this?

Cheers
Florian

update to spring boot 3

Scope of this ticket is the migration to spring boot 3. This includes migration of subethasmtp as it is currently specific to jakarta ee

Question: How to integrate the project in Docker Compose?

Hi, thanks for sharing your project! I just seem to be having some issues integrating it into our dev environment. We have an application consisting of various Spring Boot micro services, all deployed in containers, locally deployed via docker compose. Logically there should be no need to use production e-mails on localhost and that's why we wanted to mock the SMTP server.

We tried to integrate your project into our docker-compose file, but we keep getting "Connection refused".

This is the docker-compose file (edited to remove sensitive info):

version: '3'
services:
  fakesmtp:
    image: gessnerfl/fake-smtp-server
    ports:
      - "5025:5025"
      - "5080:5080"
      - "5081:5081"
    environment:
      - [email protected]
      - FAKESMTP_AUTHENTICATION_PASSWORD=password
    volumes:
      - ./email:/var/mail
  app-auth:
    image: app-auth:latest
    ports:
     - "9000:9000"
    environment:
     - SPRING_PROFILES_ACTIVE=development
     - SPRING_MAIL_HOST=127.0.0.1
     - SPRING_MAIL_PORT=5025
     - SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE=false
     - [email protected]
     - SPRING_MAIL_PASSWORD=password

Any hint what I'm doing wrong? Thanks a lot!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.