I have a service that introduced JavaMailSender. My service sets it up and sends mail. I would like to intercept the raw mail to make sure the information is correct. I would like to do this in JUnit.
How do you guys do this?
@Service public class MyServiceImpl { @Autowired private JavaMailSender _mailSender; public void sendMail(String to, String body, String subject){ ... _mailSender.something ... } }
java spring java-ee character-encoding javamail
Jordi PS
source share