38 questions
0
votes
0
answers
225
views
Java mail sender integration test with Green Mail failing in spring boot after installing spring boot actuator
I have been working on a project for quite long time. I had written quite a lot of integration tests(39). All of the tests used to pass. Recently I decided to add spring actuator starter project. But ...
0
votes
0
answers
302
views
GreenMail: SSLHandshakeException: Received fatal alert: handshake_failure when try to connect IMAPS
I've been trying to fetch an mocked mail of GreenMail instance through IMAPS protocol and no matter what I do, I keep receiving javax.net.ssl.SSLHandshakeException: Received fatal alert: ...
0
votes
1
answer
712
views
GreenMail server works in single integration test class but not when all integration classes are started
I have several integration test classes, when I'm executing a single one, the greenmail server will be started and works as expected. But when I'm starting all integrations tests it fails, and it's ...
3
votes
0
answers
961
views
Greenmail in Spring setup
I have problem that my GreenMail instance doesn't work properly in tests. I have an app with testcontainers and graphql tester, and everything works fine before I add GreenMail for testing.
I use this ...
0
votes
1
answer
1k
views
GreenMail atomic getReceivedMessages() and purgeEmailFromAllMailboxes()
Is there a way how to atomically receive messages from GreenMail and then purge those messages? I don't want to receive any message more than once. Something like getReceivedMessagesAndPurge().
In my ...
0
votes
1
answer
2k
views
GreenMail server works in single integration test class but not when all integration classes will be started
I have several integration test classes, when I am executing a single one, the greenmail server will be started and works as expected. But when I am starting all integrations tests it fails, and its ...
1
vote
1
answer
6k
views
Springboot Testing via Greenmail
I tried to test my Gmail smtp in my Spring-Application and followed this Tutorial. I have implemented it as specified in the tutorial, but my EmailService throws a MailSendException:
org....
1
vote
3
answers
2k
views
Spring Email with Greenmail: Authentication Credentials Invalid
I am trying to write test code for Spring Email using Greenmail. This works perfectly with 1.5.5 version of Greenmail, however when I try to update the version of Greenmail (1.5.6 to 1.5.11) it keeps ...
0
votes
2
answers
5k
views
Junit5 Tests for Spring Email with GreenMail Server using SMTP
I am trying to write JUnit5 tests for Spring Email.
When i am running the test , Greenmail server is not receiving any messages.
Attaching code snippets for the same:
@ExtendWith(MockitoExtension....
0
votes
1
answer
1k
views
How to randomize the ports in greenmail for CI Server
Using JUnit & Greenmail I want to achieve a random port used by greenmail rather than the default ports or the ports with offset.
To do so I tried to get a random port with ServerSocket(0) and the ...
0
votes
2
answers
83
views
JUnit refers to same var value
I'm writing a test like this
public String cc = "";
@Test
public void testSendMailWithMissingData() throws MessagingException {
String sender = "[email protected]";
String receiver = "test2@...
1
vote
3
answers
2k
views
How to disable authentication while testing email service using greenmail
I have written an email service using Spring Email and then used Greenmail to test the email service. But while running the test case it gives an error Authentication failed as below:
javax.mail....
-1
votes
1
answer
6k
views
Test if the mail sent sucessfully using Java
I have a mailingService who sends the mail:
@Component
public class MailingServiceImpl implements MailingService{
@Autowired
JavaMailSenderImpl mailSender;
@Override
public void ...
0
votes
1
answer
403
views
How can I load .msg file into GreenMail mailbox
I'd like to load .msg bounce mail sample to GreenMail mock mailbox for testing. How can I do that?
1
vote
1
answer
983
views
greenmail - keycloak connection doesn't work
I'm trying to write some integration tests on my keycload flows.
To validate the registration and password forgotten mails, I would like to use greenmail.
my docker configuration of greenmail (within ...