Closed Reagan1947 closed 2 years ago
@Reagan1947 basically this should work. You only need to adopt in the test the configuration to the host and port of the fakesmtp server instance which you use for testing. If the service is running locally or in a container using port bindings localhost should work well.
@Reagan1947 basically this should work. You only need to adopt in the test the configuration to the host and port of the fakesmtp server instance which you use for testing. If the service is running locally or in a container using port bindings localhost should work well.
Thank you very much, I would like to know more about the following configuration, does it apply to bind my SMTP Server host at Spring-Boot config?:
#The binding address of the Fake SMTP Server; Bound to all interfaces by default / no value
fakesmtp.bindAddress
With fakesmtp.bindAddress
you can configure to which network interface the smtp server port should be bound. By default it will be bound to all interfaces/addresses. The configuration needs to be specified compatible to java.net.InetAddress
.
With
fakesmtp.bindAddress
you can configure to which network interface the smtp server port should be bound. By default it will be bound to all interfaces/addresses. The configuration needs to be specified compatible tojava.net.InetAddress
.
Thank you so match !
How should I configure
Describe :
I want to test my sending Email function, in my Spring-Boot project, I have the following configuration:
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 to5025
and I do received Email in fake-smtp-serve. I'm wondering if I just need to change the port configurationRef :
The test configuration I used: