I have a class:
@Service
public class MyEmailService {
public SendEmailResponse sendEmail(...) {
try {
...
javaMailSender.send(mimeMessage);
...
In configuration, the mail server is set as a DNS name. But this DNS could be resolved by different IP addresses. DNS round robin is implemented this way. For me it is a way of load balancing between servers.
To make it working I have to make sure that javaMailSender will make DNS query before each request. I haven't found anything about it in documentation. Could you please help?