0

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?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710

0 Answers0